build: use prepare+build

This commit is contained in:
undefined committed 2021-04-18 19:43:35 +08:00
1 parent 3b985fdba2
commit 5d16bc740b
4 files changed
+4 -14

No files matched your search

-10
View File
@@ -1,7 +1,5 @@
const fs = require('fs');
const path = require('path');
const { argv } = require('yargs');
const { sync } = require('cross-spawn');
const compilerOptionsBase = {
target: 'es2019',
@@ -69,11 +67,3 @@ for (const package of packages) {
}
}
fs.writeFileSync(path.resolve(process.cwd(), 'tsconfig.json'), JSON.stringify(config));
sync('./node_modules/.bin/tsc -b packages/hydrooj', { stdio: 'inherit' });
if (argv.watch) {
sync('./node_modules/.bin/tsc -b --watch', { stdio: 'inherit' });
} else {
sync('./node_modules/.bin/tsc -b', { stdio: 'inherit' });
}