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.3 to 0.1.4

2

package.json
{
"name": "npm-watch",
"version": "0.1.3",
"version": "0.1.4",
"description": "run scripts from package.json when files change",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -29,3 +29,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.
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.

@@ -38,3 +38,4 @@ ```javascript

"extensions": "js,jsx",
"ignore": "src/vendor/external.min.js"
"ignore": "src/vendor/external.min.js",
"quiet": "true"
}

@@ -41,0 +42,0 @@ },

@@ -47,2 +47,3 @@ 'use strict';

var ignores = null
var quiet = null

@@ -53,2 +54,3 @@ if (typeof pkg.watch[script] === 'object' && !Array.isArray(pkg.watch[script])) {

ignores = pkg.watch[script].ignore
quiet = pkg.watch[script].quiet
} else {

@@ -81,4 +83,9 @@ patterns = pkg.watch[script]

})
proc.stdout.pipe(prefixer('[' + script + ']')).pipe(stdin.stdout)
proc.stderr.pipe(prefixer('[' + script + ']')).pipe(stdin.stderr)
if (quiet === 'true') {
proc.stdout.pipe(stdin.stdout)
proc.stderr.pipe(stdin.stderr)
} else {
proc.stdout.pipe(prefixer('[' + script + ']')).pipe(stdin.stdout)
proc.stderr.pipe(prefixer('[' + script + ']')).pipe(stdin.stderr)
}
})

@@ -85,0 +92,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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