This commit is contained in:
soupette 2018-04-25 16:34:20 +02:00
parent fb35bc75e0
commit b7fffb0ce7
9 changed files with 22 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -52,4 +52,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

@ -1,3 +1,4 @@
const fs = require('fs');
const shell = require('shelljs');
const path = require('path');
const _ = require('lodash');
@ -25,7 +26,20 @@ shell.echo('');
if (process.env.npm_config_plugins === 'true') {
const plugins = path.resolve(appPath, 'plugins');
shell.ls('* -d', plugins).forEach(function (plugin) {
shell.ls('* -d', plugins)
.filter(x => {
let hasAdminFolder;
try {
fs.accessSync(path.resolve(appPath, 'plugins', x, 'admin', 'src', 'containers', 'App'));
hasAdminFolder = true;
} catch(err) {
hasAdminFolder = false;
}
return hasAdminFolder;
})
.forEach(function (plugin) {
shell.echo(`🔸 Plugin - ${_.upperFirst(plugin)}`);
shell.echo('📦 Installing packages...');
shell.exec(`cd "${path.resolve(plugins, plugin)}" && npm install`, {

View File

@ -47,4 +47,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

@ -51,4 +51,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

@ -48,4 +48,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

@ -48,4 +48,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -55,4 +55,4 @@
"npm": ">= 5.0.0"
},
"license": "MIT"
}
}

View File

@ -215,7 +215,6 @@ class Strapi extends EventEmitter {
// Harmonize plugins configuration.
await plugins.call(this);
console.log('INITIALISED ENDED');
}
reload() {