rerun-script
Advanced tools
Comparing version 0.5.2 to 0.6.0
@@ -62,4 +62,10 @@ 'use strict' | ||
} | ||
watches = watches.map(function (watch) { | ||
if (!Array.isArray(watch.patterns)) { | ||
watch.patterns = [watch.patterns] | ||
} | ||
return watch | ||
}) | ||
debug('watches list: %s', JSON.stringify(watches)) | ||
return watches | ||
} |
{ | ||
"name": "rerun-script", | ||
"version": "0.5.2", | ||
"version": "0.6.0", | ||
"description": "Invoke npm scripts upon file changes. Configure via package.json using glob patterns.", | ||
@@ -11,5 +11,4 @@ "main": "index.js", | ||
"standard": "standard", | ||
"standard:format": "standard-format", | ||
"test": "tape test.js | tap-spec", | ||
"watch": "bin/rerun-script" | ||
"test": "node test.js | tap-spec", | ||
"dev": "bin/rerun-script" | ||
}, | ||
@@ -56,3 +55,2 @@ "watches": { | ||
"standard": "^3.3.0", | ||
"standard-format": "^1.3.5", | ||
"tap-spec": "^2.2.2", | ||
@@ -59,0 +57,0 @@ "tape": "^3.0.0" |
@@ -62,2 +62,18 @@ # rerun-script | ||
If you only have one pattern to match for a script, you can pass in a string instead of an array: | ||
{ | ||
"scripts": { | ||
"test": "node test.js", | ||
"lint": "standard", | ||
"watch": "rerun-script" | ||
}, | ||
"watches": { | ||
"test": "test/**/*.js", | ||
"lint": "*.js" | ||
} | ||
} | ||
## start the watcher | ||
@@ -64,0 +80,0 @@ |
9158
3
76
95