Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exit-on-changes

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exit-on-changes

Exit a node/io.js process when changes to source files in the current directory are detected

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

exit-on-changes

NPM version

exit-on-changes quits your node/io.js program when changes to source files are detected, leaving the parent process or shell to actually start it again. This avoids some of the problems with other solutions that must spawn two io.js processes or prevent you from using your shell aliases. exit-on-changes is particularly useful (vs. the alternatives) in Cygwin environments, but works elsewhere too.

Install

In your project, run:

npm install exit-on-changes --save

or install from the GitHub repo:

npm install ludios/exit-on-changes --save

API

Somewhere in your program:

require('exit-on-changes');

Then start your program with the environmental variable EXIT_ON_CHANGES_ENABLED=1.

This will exit on changes to source files in the current directory. To actually have the program restart in a loop, use this restarter() function for zsh, or write a similar loop.

Example:

restarter EXIT_ON_CHANGES_ENABLED=1 iojs app.js

Keywords

FAQs

Package last updated on 23 May 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc