aspect-cli
aspect-cli copied to clipboard
[FR] [gazelle] - generate js_binary|test targets for npm package bins
What is the current behavior?
Not supported
Describe the feature
Today gazelle generates rules to compile + package ts and js. Those should then be consumable by binary + test targets such as jest_test or generic entries from npm package bin entries.
As a user, some notes:
- I would expect I could use gazelle to generate any npm package that rules_js produces this way
- I would expect that I can use
map_kindon any of these packages so I can provide macros for them that do some extra leg work for my users such that it requires less setup
Ideas for potential API:
# gazelle:js_pkg_bin @npm//examples/webpack_cli webpack_cli target_x **/*.ts
To produce:
load("@npm//examples/webpack_cli:webpack-cli/package_json.bzl", "bin")
bin.webpack_cli(
name = "target_x",
data = [... each individual file matching the glob ...]
)