1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-12-23 13:47:22 +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.
*/
function verify_theme( themeNameOrPath ) {
var tFolder = PATH.resolve(
__dirname,
'../../node_modules/fresh-themes/themes',
var tFolder = PATH.join(
parsePath ( require.resolve('fresh-themes') ).dirname,
themeNameOrPath
);
var exists = require('path-exists').sync;