File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,16 @@ var compiler = {
77
77
tmpDir = options [ 'cache-directory' ]
78
78
? path . resolve ( options [ 'cache-directory' ] )
79
79
: path . join ( os . tmpdir ( ) , '.ts-node' )
80
-
80
+ var compilerOptions
81
+ if ( options [ 'compilerOptions' ] ) {
82
+ try {
83
+ compilerOptions = JSON . parse ( options [ 'compilerOptions' ] )
84
+ } catch ( e ) {
85
+ console . log ( 'Could not parse compilerOptions' , options [ 'compilerOptions' ] )
86
+ console . log ( e )
87
+ }
88
+ }
89
+
81
90
var tsNodeOptions = {
82
91
fast : options [ 'fast' ] ,
83
92
cache : options [ 'cache' ] || ! options [ 'no-cache' ] ,
@@ -91,7 +100,7 @@ var compiler = {
91
100
ignoreWarnings : options [ 'ignoreWarnings' ] || options [ 'ignoreDiagnostics' ] ,
92
101
ignoreDiagnostics : options [ 'ignoreDiagnostics' ] ,
93
102
disableWarnings : options [ 'disableWarnings' ] ,
94
- compilerOptions : options [ ' compilerOptions' ]
103
+ compilerOptions : compilerOptions
95
104
}
96
105
try {
97
106
register ( tsNodeOptions )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ts-node-dev" ,
3
- "version" : " 1.0.0-pre.17 " ,
3
+ "version" : " 1.0.0-pre.18 " ,
4
4
"description" : " Compiles your TS app and restarts when files are modified." ,
5
5
"keywords" : [
6
6
" restart" ,
33
33
},
34
34
"scripts" : {
35
35
"test-node-dev" : " tap test/*.js" ,
36
- "test" : " node ./bin/ts-node-dev -r ./test/ts/add-require.js --respawn --ignore-watch 'lib' --ignore-watch bin --prefer-ts --cache-directory .ts-node test/ts/test-script test-arg --fd" ,
36
+ "test" : " node ./bin/ts-node-dev -r ./test/ts/add-require.js -O \" { \\\" module \\\" : \\\" commonjs \\\" } \" - -respawn --ignore-watch 'lib' --ignore-watch bin --prefer-ts --cache-directory .ts-node test/ts/test-script test-arg --fd" ,
37
37
"test-docker" : " docker run --rm -v ${PWD}:/app mhart/alpine-node:8.7.0 sh -c 'cd app && node ./bin/ts-node-dev --cache-directory .ts-node test/ts/big'"
38
38
},
39
39
"dependencies" : {
You can’t perform that action at this time.
0 commit comments