tbj

Get rid of the 'Terminate batch job' prompts when running Node and NPM scripts.

Usage no npm install needed!

<script type="module">
  import tbj from 'https://cdn.skypack.dev/tbj';
</script>

README

This is a simple command line tool that eliminates the annoying "Terminate batch job (Y/N)?" messages when pressing Ctrl+C on npm scripts.

To use it, first install it as a developer dependency, or globally:

npm install -D tbj

Then, wrap any scripts in your package.json file with the tbj command. For instance:

"scripts": {
    "start": "tbj nodemon dist/index.js",
    "build": "tbj node bin/build.js"
}

Finally, running npm start or npm run <script> will allow you to press Ctrl+C and quietly stop the program - no more annoying prompts.

The only known caveat is that the underlying process is forcefully closed, so any custom graceful shutdown procedures won't be triggered.