mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
549 B
JavaScript
25 lines
549 B
JavaScript
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.*'));
|
|
|
|
console.log(`开始安装插件依赖:\n${pluginDirs.join('\n')}`);
|
|
|
|
Promise.all(
|
|
pluginDirs.map((dir) =>
|
|
execa('yarn', {
|
|
cwd: dir,
|
|
stdout: 'inherit',
|
|
stderr: 'inherit',
|
|
})
|
|
)
|
|
)
|
|
.then(() => {
|
|
console.log('插件依赖安装完毕');
|
|
})
|
|
.catch((err) => {
|
|
console.error('插件依赖安装失败:', err);
|
|
});
|