提交 f4b475f1 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

speed up puppet module install all

上级 5b26ee28
......@@ -180,20 +180,23 @@ export class PuppetManager {
public static async installAll (): Promise<void> {
log.info('PuppetManager', 'installAll() please wait ...')
const moduleList: string[] = []
for (const puppetModuleName of Object.keys(PUPPET_DEPENDENCIES)) {
const version = PUPPET_DEPENDENCIES[puppetModuleName as any as PuppetModuleName]
if (version === '0.0.0') {
continue
if (version !== '0.0.0') {
moduleList.push(`${puppetModuleName}@${version}`)
}
await npm.install(
`${puppetModuleName}@${version}`,
{
cwd : await pkgDir(__dirname),
output : true,
save : false,
},
)
}
await npm.install(
moduleList,
{
cwd : await pkgDir(__dirname),
output : true,
save : false,
},
)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册