-
Notifications
You must be signed in to change notification settings - Fork 0
/
jakefile.ts
56 lines (45 loc) · 1.21 KB
/
jakefile.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/// <reference path="typings/jake/jake.d.ts" />
import fs = require("fs");
directory("lib");
file("lib/jake-typescript.js", ["lib", "lib/jake-typescript.ts"], ()=>
{
var cmd = "tsc --removeComments --module commonjs --noImplicitAny lib/jake-typescript.ts";
console.log(cmd + "\n");
var ex: jake.Exec = jake.createExec([cmd]);
ex.addListener("stdout", output=>
{
process.stdout.write(output);
});
ex.addListener("stderr", error=>
{
process.stderr.write(error);
});
ex.addListener("cmdEnd", ()=>
{
complete();
});
ex.addListener("error", ()=>
{
fs.unlinkSync("lib/jake-typescript.js");
console.log("Compilation of " + name + " failed.");
});
ex.run();
}, { async: true });
task("default", ["lib/jake-typescript.js"]);
npmPublishTask('jake-typescript', function ()
{
this.packageFiles.include([
'jakefile.js',
'jakefile.ts',
'LICENSE',
'makejakefile.cmd',
'package.json',
'README.md',
'lib/jake-typescript.d.ts',
'lib/jake-typescript.js',
'lib/jake-typescript.ts',
'typings/**'
]);
this.needTarGz = true;
this.needTarBz2 = true;
});