1
0
Fork 0

fix(build): add make target for watch mode

This commit is contained in:
Sean Sube 2023-02-17 23:16:02 -06:00
parent 3c001a985f
commit 3dde3b9237
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 11 additions and 2 deletions

View File

@ -55,3 +55,6 @@ lint: deps
test: build
MOCHA_FILE=out/test-results.xml yarn c8 $(COVER_OPTS) mocha $(MOCHA_OPTS) "out/**/Test*.js"
watch: deps
WATCH=TRUE make ci

View File

@ -3,8 +3,14 @@ import { join } from 'path';
import alias from 'esbuild-plugin-alias';
import { copy } from 'esbuild-plugin-copy';
const debug = process.env['DEBUG'] === 'TRUE';
const watch = process.env['WATCH'] === 'TRUE';
function envTrue(key) {
const val = (process.env[key] || '').toLowerCase();
return val == '1' || val == 't' || val == 'true' || val == 'y' || val == 'yes';
}
const debug = envTrue('DEBUG');
const watch = envTrue('WATCH');
const root = process.cwd();
const plugins = [];