News for hackers. Stuff that matters.
Re:Show HN: Run NPM Scripts with .envs by marius_k on Tuesday January 25, 2022 @05:59PM (#30079340)
I still do not understand the pros of having these scripts in package.json instead of ./scripts/*.sh..
Re:Show HN: Run NPM Scripts with .envs by kraenhansen on Wednesday January 26, 2022 @05:08AM (#30083682)
I second tedmiston's point above. It's mainly convenience (running `npm run` which can be auto-completed with a shell integration too), but also discoverability: If you're switching between multiple projects, its nice to know that you can simply look there for the commands that you're able to run.

I especially like the package.json scripts for simple one-liners, if I have something complicated I might also create a ./scripts directory with a script and call that from an npm run-script.

Re:Show HN: Run NPM Scripts with .envs by tedmiston on Tuesday January 25, 2022 @10:14PM (#30081220)
Mainly just the convenience of being able to run `npm run foo` and convenience if you need to interact with any executables installed in the node modules.

I still use Makefiles everywhere in all of my projects. I like knowing I can have a consistent interface to everything with `make build`, `make run`, `make install`, etc.