New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

watch-js

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch-js

watch

latest
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

watch-js

  Usage: watch [options] <file>

  Options:

    -h, --help          output usage information
    -V, --version       output the version number
    -m, --match <glob>  Only report changes when filename matches glob.
    -i, --interval <s>  Run on an interval of seconds.
    -b, --before <cmd>  Command to run before monitoring starts.
    -r, --running       Monitor long-running process.
    -v, --verbose       Be verbose.
    -l, --live          Live reload.
    -d, --delay <ms>    Time in ms to delay updates.
    -w, --watch <dir>   Watch for changes on dir.

Examples

Runs make when a file changes:

$ watch make

Runs make before monitoring (-b), then runs node server, a long-running process (-r):

$ watch -rb make node server

Runs make then reloads (-l) browser when files of type .js or .css change (-m):

$ watch -lm *.{js,css} make

The above method requires this script tag:

<script src="http://localhost:3003/reload.js"></script>

If you use Components you can add it in like this:

"development": {
  "stagas/watch-js": "*"
}

Then you can do require('stagas-watch-js') in your development files.

Now, in conjuction with watch -l make, when you save a file in your editor it will run make and reload your browser automatically.

Combinations possible:

$ watch -lrb "make clean build" node server

License

MIT

FAQs

Package last updated on 30 Oct 2013

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