4 ms·
See also https://james-forbes.com/#!/posts/alternative-to-npm-scripts https://james-forbes.com/#!/posts/alternative-to-npm-scripts Which uses `eval "$@"` and b
by pygy_ 6y ago
See also https://james-forbes.com/#!/posts/alternative-to-npm-scripts https://james-forbes.com/#!/posts/alternative-to-npm-scripts
Which uses `eval "$@"` and bash functions, which let one pass arguments to your scripts. If you call the script file `run`, you end up with `bash run my-task`.
- hinkley 6y agoExcept yet again we have someone who doesn’t understand how exit codes work in bash shell scripts. Npm errors out if the sub commands generate a nonzero exit code. I’ve fixed so many bash scripts that ignore errors and just keep going.