Skip to content

Commit

Permalink
dont npm install for module more than once, same module in config.js …
Browse files Browse the repository at this point in the history
…multiple times
  • Loading branch information
sdetweil committed Apr 19, 2020
1 parent 4c4786e commit 1471c70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dumpactivemodules.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
const config = require('../config/config.js');const fs=require('fs');
var hash = {}
for(let m of config.modules){
if(!(m.disabled || false)){
try {
let f=fs.statSync(m.module);
if(f.isDirectory()){
f1=fs.statSync(m.module+'/package.json');
if (f1.isFile()){
console.log(m.module);
if(hash[m.module]==undefined){
hash[m.module]=true;
console.log(m.module);
}
}
}
}
Expand Down

0 comments on commit 1471c70

Please sign in to comment.