Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

you don't need NPM to run bash scripts, or js scripts

it doesn't matter that you have the thing re-written in Rust, because there is no reason for such thing to exist in the first place.



Isn't the point of `npm run`/`npx` to run stuff in the local `node_modules` folder?

It's much more convenient to type `npx something` than `./node_modules/something/bin/something`, for example. Especially so when folder names are not obvious.


Just put your scripts in bash functions and then all of them in a scripts file, with enhanced $PATH at the top, or use make. In fact most of the more sophisticated projects use this approach.

package.json is such a sloppy and arbitrary place for your scripts. I don't know how the creator of node looks at the mountain of things that are all in package.json and thinks that's a fine design. You are a package manager, stick to it.


we're calling out 'npm run dev' now???


I've seen an occasional `npm run bash ...` and `npm run docker ...`. I presumed that was to have tooling like .env hook into it and setup the env. But it might be stupid copy-paste errors, as well.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: