open-cli-tools / concurrently

Run commands concurrently. Like `npm run watch-js & npm run watch-less` but better.
https://www.npmjs.com/package/concurrently
MIT License
7k stars 228 forks source link

Suppress current task being outputted in terminal before it runs #430

Closed iantearle closed 1 year ago

iantearle commented 1 year ago

Is it possible to stop the output of the current task:

for example if I run my npm script "production"

"production": "concurrently -r -s -g --silent --no-color \"npm run -s build:css\" \"npm run -s build:woocommerce\" \"npm run -s build:js\"",

I get the out put of:

> starter_hybrid@1.0.0 production
> concurrently -r -s -g --silent --no-color "npm run -s build:css" "npm run -s build:woocommerce" "npm run -s build:js"

What's even more odd if I have a postproduction script it prints out the task too:

> starter_hybrid@1.0.0 postproduction
> echo "\033[0;32m \xE2\x9C\x94 Production assets built \033[0m"

 ✔ Production assets built 
paescuj commented 1 year ago

Closing as this is unrelated to concurrently but to npm itself. You might want to try out the following solution: https://stackoverflow.com/a/75581185/20504834

iantearle commented 1 year ago

Yup, apologies @paescuj I discovered this through some more testing that its npm itself I needed to deal with - it through me as running the commands directly outside of concurrently didn't show the same output. I've gone with adding log level to .npmrc - thanks for your response.