Add FORCE_COLOR and tsc --pretty

This commit is contained in:
Jerko Steiner 2019-11-01 12:46:25 -04:00
parent c53ef19ab4
commit e27fdfb212
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ export async function run(command: string, args: string[], cwd?: string) {
return new Subprocess(command, args, { return new Subprocess(command, args, {
...process.env, ...process.env,
PATH: getPathVariable(), PATH: getPathVariable(),
FORCE_COLOR: '1',
}) })
.run(cwd) .run(cwd)
} }

View File

@ -27,7 +27,7 @@ export async function build(...argv: string[]) {
const args = parse(argv) const args = parse(argv)
const path = args.esm ? join(args.project, 'tsconfig.esm.json') : args.project const path = args.esm ? join(args.project, 'tsconfig.esm.json') : args.project
const watchArgs = args.watch ? ['--watch', '--preserveWatchOutput'] : [] const watchArgs = args.watch ? ['--watch', '--preserveWatchOutput'] : []
await run(tsc, ['--build', path, ...watchArgs]) await run(tsc, ['--build', '--pretty', path, ...watchArgs])
} }
build.help = 'Build or watch TypeScript project' build.help = 'Build or watch TypeScript project'