aspect-build / aspect-build/rules_js
[FR]: 'include_npx' for js_binary
- Dominant language
- Starlark
- Stars
- 378
- Forks
- 183
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 32
Description
### What is the current behavior?
There's currently an `include_npm` attribute for js_binary (https://github.com/aspect-build/rules_js/blob/main/docs/js_binary.md#js_binary-include_npm) to include the npm executable, which is great.
However, I'm using a package called [icon-font-buildr](https://www.npmjs.com/package/icon-font-buildr) which actually spawns `npx` at runtime. Currently I'm getting away with this because our CI machine has Node/npm/npx installed so I'm using the system path for it, but would ideally like to get this to work with RBE and systems that don't have Node already.
### Describe the feature
Wondering if it would be possible to add an `include_npx` attribute for js_binary?
Or perhaps it would be better to just add a symlink for `npx` when `include_npm` is true? Thoughts?
Contributor guide
Research direction
The entry point is js_binary, and docs/js_binary.md#js_binary-include_npm documents the existing npm behavior; start there and inspect how that attribute exposes the executable. Resolve whether the feature should add include_npx or create an npx symlink, then verify that the selected behavior works under RBE without a system Node installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100