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

Separate compiler rules from library rules #2119

Closed
alexeagle opened this issue Aug 16, 2020 · 2 comments
Closed

Separate compiler rules from library rules #2119

alexeagle opened this issue Aug 16, 2020 · 2 comments
Labels
Can Close? We will close this in 30 days if there is no further activity enhancement

Comments

@alexeagle
Copy link
Collaborator

Broken out from #2038. @pauldraper suggests:

I think it makes sense to have ts_compiler/ng_compiler rule as I suggested. It allows separate configuration/fiddling with the compiler and associated runtime libs. ts_compiler would be TypeScript compiler (typescript), runtime library (tslib), and perhaps options

ts_compiler(
  name = "tsc",
  compiler = "@npm//typescript",
  runtime_deps = ["@npm//tslib"],
  options = { "strict": True } # defaults
)

ts_library(
  name = "example_ts"
  compiler = ":tsc", # default to some bind()
  srcs = glob(["**/*.ts"])
)

ng_compiler(
  name = "ngc",
  compiler = "@npm//angular-compiler-cli",
  runtime_deps = ["@npm//angular-core", "@npm//tslib"],
  options = { "strict": True } # defaults
)

ng_library(
  name = "example_ng"
  compiler = ":ngc", # default to some bind()
  srcs = glob(["**/*.ts"])
  assets = glob(["**/*.html", "**/*.css"])
)
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

@github-actions github-actions bot added the Can Close? We will close this in 30 days if there is no further activity label Oct 19, 2020
@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This issue was automatically closed because it went two weeks without a reply since it was labeled "Can Close?"

@github-actions github-actions bot closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? We will close this in 30 days if there is no further activity enhancement
Projects
None yet
Development

No branches or pull requests

2 participants