
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
ts-node-dev
Advanced tools
ts-node-dev is a development tool for TypeScript that allows you to run and restart your TypeScript application automatically when files are modified. It combines the functionality of ts-node and nodemon, providing a seamless development experience for TypeScript projects.
Automatic Restart
Automatically restarts the TypeScript application when any file in the project is modified. This is useful for development as it eliminates the need to manually restart the server after making changes.
ts-node-dev --respawn src/index.ts
Fast Compilation
Uses TypeScript's transpile-only mode to speed up the compilation process. This is useful for development environments where type checking can be deferred to a later stage.
ts-node-dev --transpile-only src/index.ts
Ignore Files
Allows you to specify files or directories to ignore for changes. This is useful for excluding large directories like node_modules from being watched, which can improve performance.
ts-node-dev --ignore-watch node_modules src/index.ts
Custom Compiler
Allows you to specify a custom TypeScript compiler. This is useful if you are using a TypeScript compiler with additional features or plugins.
ts-node-dev --compiler ttypescript src/index.ts
Nodemon is a utility that monitors for any changes in your source and automatically restarts your server. It is language-agnostic and can be used with JavaScript, TypeScript, and other languages. Unlike ts-node-dev, nodemon does not provide TypeScript compilation out of the box and requires additional setup to work with TypeScript.
ts-node is a TypeScript execution environment and REPL for Node.js. It allows you to run TypeScript code directly without precompiling. However, it does not provide automatic restarts on file changes, which is a feature provided by ts-node-dev.
Webpack is a module bundler that can be used to compile TypeScript code and watch for changes. It is highly configurable and can be used with various plugins and loaders to achieve similar functionality to ts-node-dev. However, it is more complex to set up and configure compared to ts-node-dev.
Hacked 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 significantly increasing speed of restarting. Because comparing to node-dev -r ts-node/register ...
there is no need to instantiate ts-node
compilation each time.
yarn add ts-node-dev
npm i ts-node-dev --global
ts-node-dev [node-dev|ts-node flags] [script] [script arguments]
ts-node-dev --fast --respawn server.ts
By defalut it puts compiled and cached files in the .ts-node
directory of the project, so put it in .gitignore
.
WTF.
FAQs
Compiles your TS app and restarts when files are modified.
The npm package ts-node-dev receives a total of 842,726 weekly downloads. As such, ts-node-dev popularity was classified as popular.
We found that ts-node-dev demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.