build: use prepare+build

pull/118/head
undefined 4 years ago
parent 3b985fdba2
commit 5d16bc740b

@ -31,7 +31,7 @@ jobs:
run: yarn
- name: Build
run: |
yarn build
yarn build --verbose
yarn build:ui:production
- name: Lint
run: yarn lint:ci

@ -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' });
}

@ -6,8 +6,8 @@
],
"main": "package.json",
"scripts": {
"build": "node build/build.js",
"build:watch": "node build/build.js --watch",
"build": "node build/prepare.js && tsc -b",
"build:watch": "node build/build.js && tsc -b --watch",
"build:ui": "node packages/ui-default/build",
"build:ui:dev": "node packages/ui-default/build --dev",
"build:ui:production": "node packages/ui-default/build --production",

@ -26,7 +26,7 @@
"koa-router": "^10.0.0",
"koa-static-cache": "^5.1.3",
"lodash": "^4.17.21",
"minio": "7.0.18",
"minio": "7.0.17",
"moment-timezone": "^0.5.32",
"mongodb": "^3.6.6",
"nodemailer": "^6.5.0",

Loading…
Cancel
Save