1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 09:56:22 +00:00

Fix theme loading glitch.

This commit is contained in:
devlinjd 2015-11-24 10:56:28 -05:00
parent af33b6eded
commit fbc98060ce

View File

@ -14,7 +14,6 @@ var FS = require( 'fs' )
// Default options.
var _defaultOpts = {
themeRelative: '../../node_modules/fluent-themes/themes',
keepBreaks: true,
freezeBreaks: true,
nSym: '&newl;', // newline entity
@ -76,7 +75,10 @@ var TemplateGenerator = module.exports = BaseGenerator.extend({
this.opts = EXTEND( true, { }, _defaultOpts, opts );
// Verify the specified theme name/path
var tFolder = PATH.resolve( __dirname, this.opts.themeRelative, this.opts.theme );
var tFolder = PATH.join(
PATH.parse( require.resolve('fluent-themes') ).dir,
this.opts.theme
);
var exists = require('../utils/file-exists');
if (!exists( tFolder )) {
tFolder = PATH.resolve( this.opts.theme );