1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-02 20:37:08 +01:00

[fix] Replace legacy theme detection code.

This commit is contained in:
hacksalot
2018-01-31 16:00:09 -05:00
parent fde2146a0b
commit 231357badc
2 changed files with 32 additions and 6 deletions

8
dist/verbs/build.js vendored
View File

@ -441,12 +441,14 @@ Implementation of the 'build' verb for HackMyResume.
/**
Load the specified theme, which could be either a FRESH theme or a JSON Resume
theme.
theme (or both).
*/
_loadTheme = function(tFolder) {
var theTheme;
theTheme = _opts.theme.indexOf('jsonresume-theme-') > -1 ? new JRSTheme().open(tFolder) : new FRESHTheme().open(tFolder);
var exists, theTheme, themeJsonPath;
themeJsonPath = PATH.join(tFolder, 'theme.json');
exists = require('path-exists').sync;
theTheme = exists(themeJsonPath) ? new FRESHTheme().open(tFolder) : new JRSTheme().open(tFolder);
_opts.themeObj = theTheme;
return theTheme;
};