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

npm-watch

Package Overview
Dependencies
Maintainers
4
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-watch - npm Package Compare versions

Comparing version 0.1.9 to 0.2.0

4

package.json
{
"name": "npm-watch",
"version": "0.1.9",
"version": "0.2.0",
"description": "run scripts from package.json when files change",
"main": "index.js",
"dependencies": {
"nodemon": "^1.3.8",
"nodemon": "^1.11.0",
"through2": "^2.0.0"

@@ -9,0 +9,0 @@ },

@@ -62,3 +62,3 @@ # npm-watch

If you need to watch files with extensions other than those that `nodemon` watches [by default](https://github.com/remy/nodemon#specifying-extension-watch-list) (`.js`, `.coffee`, `.litcoffee`), you can set the value to an object with `patterns` and `extensions` keys. You can also add an `ignore` key (a list or a string) to ignore specific files. Finally, you can add a `quiet` flag to hide the script name in any output on stdout or stderr, or you can use the `inherit` flag to preserve the original's process stdout or stderr.
If you need to watch files with extensions other than those that `nodemon` watches [by default](https://github.com/remy/nodemon#specifying-extension-watch-list) (`.js`, `.coffee`, `.litcoffee`), you can set the value to an object with `patterns` and `extensions` keys. You can also add an `ignore` key (a list or a string) to ignore specific files. Finally, you can add a `quiet` flag to hide the script name in any output on stdout or stderr, or you can use the `inherit` flag to preserve the original's process stdout or stderr. You can enable `nodemon` [legacy watch](https://github.com/remy/nodemon#application-isnt-restarting) and specify the restart [delay](https://github.com/remy/nodemon#delaying-restarting) in milliseconds with the corresponding flags.
> The `quiet` flag was changed from a `string` to a `boolean` in `0.1.5`. Backwards compatability will be kept for two patch versions.

@@ -73,3 +73,5 @@

"ignore": "src/vendor/external.min.js",
"quiet": true
"quiet": true,
"legacyWatch": true,
"delay": 2500
}

@@ -76,0 +78,0 @@ },

@@ -95,2 +95,4 @@ 'use strict';

var inherit = null
var legacyWatch = null
var delay = null

@@ -103,2 +105,4 @@ if (typeof pkg.watch[script] === 'object' && !Array.isArray(pkg.watch[script])) {

inherit = pkg.watch[script].inherit
legacyWatch = pkg.watch[script].legacyWatch
delay = pkg.watch[script].delay
} else {

@@ -125,2 +129,4 @@ patterns = pkg.watch[script]

if (ignores) { args = args.concat(ignores) }
if (legacyWatch) { args = args.concat(['--legacy-watch']) }
if (delay) { args = args.concat(['--delay', delay + 'ms']) }
args = args.concat(['--exec', exec])

@@ -127,0 +133,0 @@ var proc = processes[script] = spawn(nodemon, args, {

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