Skip to content

Commit

Permalink
fix: toolbox 缺少开发依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
zkz098 committed Jul 5, 2024
1 parent 5c7a07b commit 64919f1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions toolbox/compiler.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ if (CONFIG.legacyScript) {
} else if (sPath.startsWith('file:\\')) {
sPath = sPath.slice(8); // 去除 'file:\'
}
child_process.exec('pnpm --package=typescript dlx tsc --build'.trim(), {
cwd: sPath
}, async (code, stdout, stderr) => {
console.log('Deleting typescript files...')
await deleteFileRecursive(sPath)
console.log('Finished compiling.')
child_process.exec('pnpm install',{
cwd: path.join(sPath,'./../')
}, (code, stdout, stderr) => {
child_process.exec('pnpm --package=typescript dlx tsc --build'.trim(), {
cwd: sPath
}, async (code, stdout, stderr) => {
console.log('Deleting typescript files...')
await deleteFileRecursive(sPath)
console.log('Finished compiling.')
})
})
} else {
throw Error('Not implemented yet.')
Expand Down

0 comments on commit 64919f1

Please sign in to comment.