mirror of
https://github.com/strapi/strapi.git
synced 2025-10-28 16:39:37 +00:00
Improve script setup
This commit is contained in:
parent
beb1419fb8
commit
8f36c10e1c
18
packages/strapi-admin/scripts/setup.js
Normal file
18
packages/strapi-admin/scripts/setup.js
Normal 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`);
|
||||||
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user