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

FYI - Gazelle for JS #546

Closed
robfig opened this issue Jun 13, 2019 · 7 comments
Closed

FYI - Gazelle for JS #546

robfig opened this issue Jun 13, 2019 · 7 comments

Comments

@robfig
Copy link
Contributor

robfig commented Jun 13, 2019

Just wanted to share that I've successfully added a js language module to Gazelle to produce closure_js_library targets. I don't expect you'd want to merge it and take on the maintenance burden, but I figure you might find it interesting and maybe someone else finds it helpful.
master...robfig:js

@achew22
Copy link
Member

achew22 commented Jun 13, 2019

@robfig, this might be a thing that rules_closure is interested in merging. I wrote something like this that we're trying to get merged into rules_sass. Have you considered starting a discussion with the rules_closure group to have it live in there?

@robfig
Copy link
Contributor Author

robfig commented Jun 13, 2019

Very interesting.. I'll open an issue with them. If I understand correctly, you've actually checked in the language module to the rules_sass repo, yet you can still it up to build a gazelle with that included? Very cool.

@achew22
Copy link
Member

achew22 commented Jun 13, 2019

That's correct. The goal was to have the plugin local to the rules_* that defines it. That way when you update rules_* it will update the plugin and all your BUILD files will be updated magically 😄

@Globegitter
Copy link
Contributor

Ah nice to see more plugins cropping up - I added support for js/ts with rules_nodejs: https://github.com/ecosia/bazel_rules_nodejs_contrib#build-file-generation

@Globegitter
Copy link
Contributor

I wonder also if it could be interesting to keep a list of plugins here also to make it easier for others to find them.

@jayconrod
Copy link
Contributor

@robfig This is cool. Thank you for sharing this! As @achew22 suggested, would you consider sharing this with the rules_closure folks in case they'd be interested in merging it?

I think ideally, each rule set would have a Gazelle extension. I think those probably belong in rule repositories rather than in Gazelle itself, since the rule set authors are the most knowledgable on how their rules should be generated and used. I'm happy to review PRs for Gazelle API usage and Go readability, but I don't know enough about TypeScript or SASS for example to contribute anything substantive there.

@Globegitter Thanks for linking that extension! Collecting a list of extensions is a good idea. I've opened #554 for this.

@robfig
Copy link
Contributor Author

robfig commented Jun 17, 2019

Sounds good, I opened bazelbuild/rules_closure#394 to gauge their interest. If they don't want to maintain it, I'll just host it in a standalone repo. I'll open a PR to add it to the list you started once it's in shape. Thanks!

@robfig robfig closed this as completed Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants