Skip to content

Minimalistic utility to run a command when filesystem updates happen. Requires Node.js v0.10+

Notifications You must be signed in to change notification settings

rstacruz/nwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nwatch

Minimalistic utility to run a command when filesystem updates happen. Requires Node.js v0.10+.

$ npm install -g rstacruz/nwatch

About

Consider this a cross-platform Node.js-powered port of visionmedia/watch, and a cross-platform version of the Linux watch(1) utility.

Features:

  • cross-platform (works anywhere node.js can)
  • invokes any shell command
  • no other fancy features

Usage

Invoke nwatch <command> to run the given command when any files change in the current directory.

This command will re-run make every time any file changes:

$ nwatch make

--help

Usage: nwatch [options] <cmd>

Options:

  -h, --help          output usage information
  -V, --version       output the version number
  -q, --quiet         only output stderr
  -x, --halt          halt on failure
  -d, --dir [dir]     directory to watch
  -b, --before        run the command before watching as well
  -i, --interval <n>  polling interval (in milliseconds) [1000]
  -v, --verbose       show when a command will be ran

Alternatives

  • visionmedia/watch - works exactly the same, except it's a C program.
  • watch-js - has more features geared towards web development like LiveReload.
  • supervisor - invokes a node script (instead of an arbitrary command). also has features like auto-restart on exit.

Acknowledgements

© 2013, Rico Sta. Cruz. Released under the MIT License.

About

Minimalistic utility to run a command when filesystem updates happen. Requires Node.js v0.10+

Resources

Stars

Watchers

Forks

Packages