M-Zuber / npm-watch

run npm scripts when files change
MIT License
323 stars 38 forks source link

Hide nodemon logs #71

Closed yahiarefaiea closed 3 years ago

yahiarefaiea commented 4 years ago

I wish there is a way to hide all the logs that come with nodemon.

Check this as a reference for nodemon options.

But, you already have an option called --quiet. So do you think there is a way to pass an option that makes nodemon silent (or replace nodemon logs with new ones instead)

I could help if you're planning to implement this.

[Update]: one of the reasons why I'm asking if there's a solution for this is that I'm already using nodemon in my environment and the command line is throwing a lot of unnecessary logs which making the console very complex.

paperkotter commented 4 years ago

as variant, you can run this command npm-watch | grep --invert-match nodemon

but yeah it's better to have an option for this

M-Zuber commented 3 years ago

does --silent do what you need? For reference => https://github.com/M-Zuber/npm-watch#silent

yahiarefaiea commented 3 years ago

does --silent do what you need? For reference => https://github.com/M-Zuber/npm-watch#silent

No it doesn't.. I'm on Windows by the way

M-Zuber commented 3 years ago

My apologies, I answered without refreshing my mind Currently we don't offer the ability to pass flags from the command line, you need to instead set the config in the package.json, for example:

"watch": {
    "echo": {
        "path": "index.js",
        "silent": true
    }
}

Please let me know if this fixes your issue