mirror of
https://github.com/strapi/strapi.git
synced 2025-10-26 23:51:10 +00:00
Improve script setup
This commit is contained in:
parent
beb1419fb8
commit
8f36c10e1c
@ -46,4 +46,4 @@
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
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`);
|
||||
});
|
||||
@ -89,4 +89,4 @@
|
||||
},
|
||||
"preferGlobal": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user