Skip to content

Commit bc254a8

Browse files
committed
add transformers option
1 parent 929c9b1 commit bc254a8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ It restarts target node process when any of required files changes (as standard
66

77
## Install
88

9-
`ts-node` version is not fixed in dependencies, so it will install latest version by default, but you may install need version of `ts-node` if needed.
10-
119
```
12-
yarn add ts-node-dev ts-node
10+
yarn add ts-node-dev
1311
```
1412

1513
```
1614
npm i ts-node-dev --global
1715
```
1816

17+
`ts-node` dependency version is not fixed, so it will install the latest version by default.
18+
1919
## Usage
2020

2121
```
2222
ts-node-dev [node-dev|ts-node flags] [ts-node-dev flags] [script] [script arguments]
2323
```
2424

25-
So you just combine [node-dev](https://github.com/fgnass/node-dev) and [ts-node](https://github.com/TypeStrong/ts-node) options (lookup docs of those packages):
25+
So you just combine [node-dev](https://github.com/fgnass/node-dev) and [ts-node](https://github.com/TypeStrong/ts-node) options (see docs of those packages):
2626
```
27-
ts-node-dev --respawn server.ts
27+
ts-node-dev --respawn --type-check server.ts
2828
```
2929

3030
Also there are additional options specific to `ts-node-dev`:
@@ -35,9 +35,6 @@ So, to ignore everthing in `node_modules`, just pass `--ignore-watch node_module
3535

3636
NB! `--ignore-watch` will NOT affect files ignored by TS compilation. Use `--ignore` option (or `TS_NODE_IGNORE` env variable) to pass **RegExp strings** for filtering files that should not be compiled, by default `/node_modules/` are ignored.
3737

38-
By defalut to keep things clean it puts cached files to system temp directory, you may change this with `--cache-directory` option.
39-
40-
4138
## Caveats
4239

4340
The good thing is that `ts-node-dev` watches used `tsconfig.json` file, and will reinitialize compilation on its change, but you have to restart the process manually when you update used version of `typescript` or make any other changes that may effect compilation results.

lib/compiler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ var compiler = {
8888
ignore: options['ignore'] || process.env['TS_NODE_IGNORE'],
8989
ignoreWarnings: options['ignoreWarnings'],
9090
disableWarnings: options['disableWarnings'],
91-
compilerOptions: options['compilerOptions']
91+
compilerOptions: options['compilerOptions'],
92+
transformers: options['transformers']
9293
}
9394
try {
9495
register(tsNodeOptions)

0 commit comments

Comments
 (0)