@@ -9,18 +9,21 @@ minify();
9
9
10
10
function compile ( )
11
11
{
12
+ const STD_FILE = __dirname + "/../src/std/tsconfig.json" ;
13
+ const TEST_FILE = __dirname + "/../src/test/tsconfig.json" ;
14
+
12
15
// KEEP COMMENTS ONLY IN THE DECLARATION
13
- process . execSync ( "tsc -p ../src/std/tsconfig.json" ) ;
14
- process . execSync ( "tsc -p ../src/std/tsconfig.json --removeComments --declaration false" ) ;
16
+ process . execSync ( "tsc -p " + STD_FILE ) ;
17
+ process . execSync ( "tsc -p " + STD_FILE + " --removeComments --declaration false") ;
15
18
16
19
// TESTING UNIT
17
- process . execSync ( "tsc -p ../src/test/tsconfig.json" ) ;
20
+ process . execSync ( "tsc -p " + TEST_FILE ) ;
18
21
}
19
22
20
23
function attach_header ( )
21
24
{
22
- const TITLE_FILE = " ../src/std/typings/tstl/tstl.d.ts";
23
- const HEADER_FILE = " ../lib/tstl.d.ts";
25
+ const TITLE_FILE = __dirname + "/ ../src/std/typings/tstl/tstl.d.ts";
26
+ const HEADER_FILE = __dirname + "/ ../lib/tstl.d.ts";
24
27
25
28
var text = fs . readFileSync ( TITLE_FILE , "utf8" ) ;
26
29
text += fs . readFileSync ( HEADER_FILE , "utf8" ) ;
@@ -30,7 +33,7 @@ function attach_header()
30
33
31
34
function remove_dynamics ( )
32
35
{
33
- const JS_FILE = " ../lib/tstl.js";
36
+ const JS_FILE = __dirname + "/ ../lib/tstl.js";
34
37
35
38
var text = fs . readFileSync ( JS_FILE , "utf8" ) ;
36
39
if ( text . indexOf ( '["' ) == - 1 )
@@ -62,10 +65,10 @@ function remove_dynamics()
62
65
63
66
function test ( )
64
67
{
65
- process . execSync ( "node ../src/test/test" ) ;
68
+ process . execSync ( "node " + __dirname + "/ ../src/test/test") ;
66
69
}
67
70
68
71
function minify ( )
69
72
{
70
- process . execSync ( "minify ../lib/tstl.js" ) ;
73
+ process . execSync ( "minify " + __dirname + "/ ../lib/tstl.js") ;
71
74
}
0 commit comments