1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-23 00:40:10 +00:00

Fix relative theme directory

The theme directory assumes it was a child of the HackMyResume module, but NPM3 will actually flatten this out. Following the same logic that the template-generator uses, find the path to the themes using NPMs require method.
This commit is contained in:
TJ Lavelle 2016-01-01 11:27:05 -05:00
parent 3453293c79
commit 49e56cc226

View File

@ -242,9 +242,8 @@ Implementation of the 'generate' verb for HackMyResume.
Verify the specified theme name/path. Verify the specified theme name/path.
*/ */
function verify_theme( themeNameOrPath ) { function verify_theme( themeNameOrPath ) {
var tFolder = PATH.resolve( var tFolder = PATH.join(
__dirname, parsePath ( require.resolve('fresh-themes') ).dirname,
'../../node_modules/fresh-themes/themes',
themeNameOrPath themeNameOrPath
); );
var exists = require('path-exists').sync; var exists = require('path-exists').sync;