install tsc during build (#17)

fixes #13
This commit is contained in:
Andrew Stanton-Nurse 2016-11-08 15:31:02 -08:00 committed by GitHub
parent 2de8f98a62
commit 02c98137c7
2 changed files with 46 additions and 0 deletions

21
makefile.shade Normal file
View File

@ -0,0 +1,21 @@
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft'
use-standard-lifecycle
k-standard-goals
default TYPESCRIPT_PROJECT_GLOB = "src/*/tsconfig.json"
var nodeDirectory = '${Path.Combine(Directory.GetCurrentDirectory(), "bin", "nodejs")}'
var nodeBin = '${ Path.Combine(nodeDirectory, "node_modules", ".bin") }'
var localTsc = '${ Path.Combine(nodeBin, "tsc") }'
var localTscExists = '${ File.Exists(localTsc) }'
#install-tsc target='initialize'
var installCommand = 'install ${E("KOREBUILD_NPM_INSTALL_OPTIONS")} --prefix "${nodeDirectory}" typescript'
npm npmCommand="${installCommand}" if="!localTscExists"
@{
E("PATH", $"{nodeBin}{Path.PathSeparator}{E("PATH")}");
Console.WriteLine("PATH:" + E("PATH"));
}

View File

@ -0,0 +1,25 @@
interface EventSourceOptions {
withcredentials: boolean
}
declare class EventSource extends EventTarget {
constructor(url: string);
constructor(url: string, configuration: EventSourceOptions);
readonly CLOSED: number;
readonly CONNECTING: number;
readonly OPEN: number;
close();
onerror: (this: this, ev: ErrorEvent) => any;
onmessage: (this: this, ev: MessageEvent) => any;
onopen: (this: this, ev: Event) => any;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener(type: "open", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
readonly readyState: number;
readonly url: string;
}