Build admin during setup

This commit is contained in:
Aurelsicoko 2017-12-20 18:34:33 +01:00
parent 18de7cabc2
commit 6baf2e5090
3 changed files with 12 additions and 1 deletions

View File

@ -13,6 +13,16 @@ shell.exec(`cd ${path.resolve(pwd.stdout, 'node_modules', 'strapi-helper-plugin'
silent: true
});
shell.echo('🏗 Building...');
const build = shell.exec(`cd ${path.resolve(pwd.stdout)} && npm run build`, {
silent: true
});
if (build.stderr) {
console.error(build.stderr);
}
const plugins = path.resolve(pwd.stdout, '..', 'plugins');
shell.ls('* -d', plugins).forEach(function (plugin) {

View File

@ -24,7 +24,7 @@ module.exports = scope => {
'description': 'A Strapi application.',
'main': './server.js',
'scripts': {
'setup': 'npm install && cd admin && npm run setup' // Ready to deploy setup
'setup': 'npm install --ignore-scripts && cd admin && npm run setup' // Ready to deploy setup
'start': 'node server.js',
'strapi': 'node_modules/strapi/bin/strapi.js', // Allow to use `npm run strapi` CLI,
'lint': 'node_modules/.bin/eslint api/**/*.js config/**/*.js plugins/**/*.js',

View File

@ -3,6 +3,7 @@ coverage
build
node_modules
stats.json
package-lock.json
# Cruft
.DS_Store