build: fix some issues on Windows platforms

Closes #9450
This commit is contained in:
Marc Laval
2016-06-21 00:25:55 +02:00
parent a5f2e205ef
commit 9decc3d823
8 changed files with 44 additions and 8 deletions

View File

@ -1,4 +1,6 @@
import {spawn} from 'child_process';
import {platform} from 'os';
import {normalize} from 'path';
import {resolve} from 'url';
enum State {
@ -7,7 +9,7 @@ enum State {
error
}
export const TSC = 'node_modules/typescript/bin/tsc';
export const TSC = normalize('node_modules/.bin/tsc') + (/^win/.test(platform()) ? '.cmd' : '');
export type Command = (stdIn: any, stdErr: any) => Promise<number>;
export class TscWatch {