From fbc98060ce1cc9773939b1d067026932b32b6a52 Mon Sep 17 00:00:00 2001 From: devlinjd Date: Tue, 24 Nov 2015 10:56:28 -0500 Subject: [PATCH] Fix theme loading glitch. --- src/gen/template-generator.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gen/template-generator.js b/src/gen/template-generator.js index d3b053a..547579c 100644 --- a/src/gen/template-generator.js +++ b/src/gen/template-generator.js @@ -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 );