Improve script setup

This commit is contained in:
Aurelsicoko 2017-12-19 21:23:20 +01:00
parent beb1419fb8
commit 8f36c10e1c
3 changed files with 20 additions and 2 deletions

View File

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

View File

@ -0,0 +1,18 @@
const shell = require('shelljs');
const path = require('path');
shell.echo("It can takes few minutes...");
shell.exec('cd ./node_modules/strapi-helper-plugin');
shell.exec('npm install');
shell.exec('cd ../../');
const pwd = shell.pwd();
const plugins = path.resolve(pwd.stdout, '..', 'plugins');
shell.ls('* -d', plugins).forEach(function (plugin) {
shell.exec(`cd ${path.resolve(plugins, plugin)} && npm install`);
shell.exec(`cd ${path.resolve(plugins, plugin, 'node_modules', 'strapi-helper-plugin')} && npm install`);
shell.exec(`cd ${path.resolve(plugins, plugin)} && npm run build`);
});

View File

@ -89,4 +89,4 @@
},
"preferGlobal": true,
"license": "MIT"
}
}