Run multiple commands concurrently. Like npm run watch-js & npm run watch-less but better.
The usual way to run multiple commands concurrently is npm run watch-js & npm run watch-css. That's fine but it's hard to keep on track of different outputs. Also if one process fails, others still keep running and you won't even notice the difference.
Why concurrently? Like its explained above, concurrently provides outputs with prefixes when you have multiple scripts combined in a single script and is cross platform. I faced this issue in a project, on windows machine, where the dev script had & and as a result, it failed to run.
There are other scripts too where this concurrently is used in the same package.json file:
swift
...
"dev:worker": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"pnpm run watch\" \"nodemon worker\"",
"dev:webhook": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"pnpm run watch\" \"nodemon webhook\"",
...
I spent 3+ years studying OSS codebases and wrote 400+ articles on what makes the production-grade. Now I'm putting that into practice differently - instead of writing every fix myself, I run coding agents that do it.
How it works? Register your machine as a Runtime, point it at your repo. Agents pick up issues. write the fix, open the PR. You just review, they execute.