Closed axelpale closed 3 years ago
A solution is to use grep
. I added this line to my package.json
:
"watch": "npm-watch | grep --invert-match nodemon"
Works at least on macOS Sierra. Can somebody confirm on Linux?
@axelpale Works like a charm on Ubuntu!
Didn't work for me, or at least if I specify which task to run.
npm run watch test
npm-watch | grep --invert-match nodemon "test"
grep: test: No such file or directory events.js:163 throw er; // Unhandled 'error' event ^
Error: write EPIPE at exports._errnoException (util.js:1050:11) at WriteWrap.afterWrite [as oncomplete] (net.js:813:14)
In my case I was getting spammed with hundreds of lines like:
[nodemon] files triggering change check: build/stats/graph.csv
[nodemon] changes after filters (before/after): 1/0
Turns out I had a global nodemon.json with "verbose": true
, solution was to add this to repo package.json
:
"nodemonConfig": {
"verbose": false
}
This won't work for the other minimal starting / watching output nodemon provides.
My apologies, this has been out for a while. You can set silent
in the config for a script, and it will hide all nodemon output
"echo": {
"patterns": "index.js",
"silent": true,
"ignore": [
"*.foo.js"
]
},
It is possible to hide
[taskname]
prefix withquiet: true
. Is it possible to hide rows that have[nodemon]
?