Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] [gazelle] - generate js_binary|test targets for npm package bins #563

Open
jbedard opened this issue Dec 1, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@jbedard
Copy link
Member

jbedard commented Dec 1, 2023

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.

@jbedard jbedard added the enhancement New feature or request label Dec 1, 2023
@github-actions github-actions bot added the untriaged Requires traige label Dec 1, 2023
@Aghassi
Copy link

Aghassi commented Dec 1, 2023

As a user, some notes:

  1. I would expect I could use gazelle to generate any npm package that rules_js produces this way
  2. I would expect that I can use map_kind on 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

@jbedard
Copy link
Member Author

jbedard commented Dec 1, 2023

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 ...]
)

@alexeagle alexeagle removed the untriaged Requires traige label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

3 participants