Skip to content

Commit

Permalink
add local dir
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Oct 21, 2018
1 parent a68482c commit 682a943
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ function getModuleDir() {

const yarnDir = join(yarnModules(), 'node_modules', 'highlight.js');

if (existsSync(yarnDir)) {
if (existsSync(yarnDir)) {
return yarnDir;
}

throw 'highlight.js not found in global modules';
const localDir = join(__dirname, '..', '..', 'node_modules', 'highlight.js');

if (existsSync(localDir)) {
return yarnDir;
}

throw 'Error: highlight.js not found in node_modules';
}

function getLanguages() {
Expand Down

0 comments on commit 682a943

Please sign in to comment.