Skip to content

Commit b57158c

Browse files
committed
add new ts-node options
1 parent d3fb1a2 commit b57158c

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

bin/ts-node-dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ var opts = minimist(devArgs, {
1818
'notify',
1919
'fast',
2020
'disableWarnings',
21+
'disable-warnings',
2122
'no-cache',
2223
'cache',
2324
'type-check',
25+
'transpile-only',
2426
'transpileOnly',
2527
'files',
2628
'pretty',
@@ -35,9 +37,12 @@ var opts = minimist(devArgs, {
3537
'skip-project',
3638
'skip-ignore',
3739
'ignoreWarnings',
40+
'ignore-warnings',
3841
'ignoreDiagnostics',
42+
'ignore-diagnostics',
3943
'cache-directory',
4044
'compilerOptions',
45+
'compiler-options',
4146
'compile-timeout',
4247
'ignore-watch',
4348
'interval',

lib/compiler.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@ var compiler = {
114114
tmpDir = options['cache-directory']
115115
? path.resolve(options['cache-directory'])
116116
: fs.mkdtempSync(path.join(os.tmpdir(), '.ts-node'))
117+
var compilerOptionsArg = options['compilerOptions'] || options['compiler-options']
117118
var compilerOptions
118-
if (options['compilerOptions']) {
119+
if (compilerOptionsArg) {
119120
try {
120-
compilerOptions = JSON.parse(options['compilerOptions'])
121+
compilerOptions = JSON.parse(compilerOptionsArg)
121122
} catch (e) {
122123
console.log(
123124
'Could not parse compilerOptions',
@@ -131,16 +132,17 @@ var compiler = {
131132
fast: options['fast'],
132133
cache: options['cache'] || !options['no-cache'],
133134
typeCheck: options['type-check'],
134-
transpileOnly: options['transpileOnly'],
135+
transpileOnly: options['transpileOnly'] || options['transpile-only'],
135136
pretty: options['pretty'],
136137
cacheDirectory: options['cache-directory'] || path.join(tmpDir, 'cache'),
137138
compiler: options['compiler'],
138139
project: options['project'],
139140
skipProject: options['skip-project'],
140141
skipIgnore: options['skip-ignore'],
141142
ignore: options['ignore'] || process.env['TS_NODE_IGNORE'],
142-
ignoreWarnings: options['ignoreWarnings'] || options['ignoreDiagnostics'],
143-
ignoreDiagnostics: options['ignoreDiagnostics'],
143+
ignoreWarnings: options['ignoreWarnings'] || options['ignoreDiagnostics'] || options['ignore-diagnostics'],
144+
ignoreDiagnostics: options['ignoreDiagnostics'] || options['ignore-diagnostics'],
145+
logError: options['log-error'],
144146
disableWarnings: options['disableWarnings'],
145147
compilerOptions: compilerOptions,
146148
files: options['files'] || true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ts-node-dev",
3-
"version": "1.0.0-pre.33",
3+
"version": "1.0.0-pre.34",
44
"description": "Compiles your TS app and restarts when files are modified.",
55
"keywords": [
66
"restart",

0 commit comments

Comments
 (0)