forked from QwikDev/qwik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsc.ts
34 lines (31 loc) · 856 Bytes
/
tsc.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { execa } from 'execa';
import { type BuildConfig, panic } from './util';
import { join } from 'path';
// TODO DRY
export async function tscQwik(config: BuildConfig) {
console.log('tsc qwik');
const result = await execa('tsc', ['-p', join(config.srcQwikDir, '..', 'tsconfig.json')], {
stdout: 'inherit',
});
if (result.failed) {
panic(`tsc for qwik failed`);
}
}
export async function tscQwikCity(config: BuildConfig) {
console.log('tsc qwik-city');
const result = await execa('tsc', ['-p', join(config.srcQwikCityDir, 'tsconfig.json')], {
stdout: 'inherit',
});
if (result.failed) {
panic(`tsc for qwik failed`);
}
}
export async function tsc(config: BuildConfig) {
console.log('tsc');
const result = await execa('tsc', {
stdout: 'inherit',
});
if (result.failed) {
panic(`tsc failed`);
}
}