A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/whitecolor/ts-node-dev below:

wclr/ts-node-dev: Compiles your TS app and restarts when files are modified.

Tweaked version of node-dev that uses ts-node under the hood.

It restarts target node process when any of required files changes (as standard node-dev) but shares Typescript compilation process between restarts. This significantly increases speed of restarting comparing to node-dev -r ts-node/register ..., nodemon -x ts-node ... variations because there is no need to instantiate ts-node compilation each time.

yarn add ts-node-dev --dev
npm i ts-node-dev --save-dev
ts-node-dev [node-dev|ts-node flags] [ts-node-dev flags] [node cli flags] [--] [script] [script arguments]

So you just combine node-dev and ts-node options (see docs of those packages):

ts-node-dev --respawn --transpile-only server.ts

There is also short alias tsnd for running ts-node-dev:

Look up flags and options can be used in ts-node's docs.

Also there are additional options specific to ts-node-dev:

If you need to detect that you are running with ts-node-dev, check if process.env.TS_NODE_DEV is set.

Points of notice:

If you have an issue, please create one. But, before:

Currently versioning is not stable and it is still treated as pre-release. You might expect some options API changes. If you want to avoid unexpected problems it is recommended to fixate the installed version and update only in case of issues, you may consult CHANGELOG for updates.

MIT.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4