chore: add plugin install

pull/13/head
moonrailgun 4 years ago
parent 1bfd1c76d6
commit 167ed4e114

@ -10,6 +10,7 @@
"build": "yarn plugins:all && cross-env TS_NODE_PROJECT='tsconfig.node.json' webpack",
"dev": "cross-env TS_NODE_PROJECT='tsconfig.node.json' NODE_ENV=development webpack serve",
"serve": "npx http-server ./dist",
"postinstall": "node plugins/install.js",
"plugins:all": "ministar buildPlugin all",
"plugins:watch": "ministar watchPlugin all"
},
@ -58,6 +59,7 @@
"css-loader": "^5.2.6",
"dotenv": "^10.0.0",
"esbuild-loader": "^2.13.1",
"execa": "^5.1.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.2",
"less": "^4.1.1",

@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

@ -0,0 +1,22 @@
const fs = require('fs-extra');
const glob = require('glob');
const path = require('path');
const execa = require('execa');
const pluginDirs = glob.sync(path.join(__dirname, './com.msgbyte.*'));
Promise.all(
pluginDirs.map((dir) => {
execa('yarn', {
cwd: dir,
stdout: 'inherit',
stderr: 'inherit',
});
})
)
.then(() => {
console.log('插件依赖安装完毕');
})
.catch((err) => {
console.error('插件依赖安装失败:', err);
});

@ -4106,6 +4106,21 @@ execa@^5.0.0:
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
execa@^5.1.1:
version "5.1.1"
resolved "https://registry.nlark.com/execa/download/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
integrity sha1-+ArZy/Qpj3vR1MlVXCHpN0HEEd0=
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.0"
human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.1"
onetime "^5.1.2"
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
exit@^0.1.2:
version "0.1.2"
resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"

Loading…
Cancel
Save