6 ms·
I know this has been around for quite a while but I feel obliged to point out one major use for this: Embedding portable one-liners in the `package.json` file i
by smilekzs 5y ago
I know this has been around for quite a while but I feel obliged to point out one major use for this: Embedding portable one-liners in the `package.json` file invoked through `npm run` [1], because you cannot assume from which shell is `npm` called by users of your package.
[1]: https://docs.npmjs.com/cli/v7/commands/npm-run-script https://docs.npmjs.com/cli/v7/commands/npm-run-script
- paulddraper 5y agoBut users don't need to run those, right? Just contributors. (Unless you have some complicated install to perform which is good to avoid for multiple reasons.)
- deleted 5y ago[deleted]
- contriban 5y agoContributors might span across OS's, so this tool might still make sense
- franga2000 5y agoI guess, but if contributors have to install nodejs already, they might as well install cygwin if they're on Windows. All other platforms that I can think of are POSIX shell-compliant.
- contriban 5y agoI don’t disagree, they should definitely just use WSL anyway for their own peace of mind. Most node tools nowadays seem to be written for macOS first, something I would have never thought would happen 10 years ago, given how popular Windows computers were “for real work”