[Proposal] Dependencies with command arguments
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 128
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
### Use case
I have `build` command that takes an optional `debug` flag that triggers a debug build. It would be very convenient if I could have a script that depends on the debug build without having to create a separate `build-debug` script, since the only difference is this extra argument:
``` json
"run": {
"command": "node ..."
"dependencies": ["build"]
},
"debug": {
"command": "node ..."
"dependencies": ["build debug"]
}
```
This dovetails very nicely with how wireit already works, as wireit already
- includes extra arguments in the [script fingerprint](https://github.com/google/wireit#fingerprint).
- separately caches and restores invocations with different argument values.
Thus successive, alternating invocations of `npm run run` and `npm run debug` is very efficient, only having to restore cached output of `build` or `build debug` as needed.
Contributor guide
Assessment
This issue has not been assessed yet.