commit | 5060a4393a8f4dc81829227101f963d3394d1eb2 | [log] [tgz] |
---|---|---|
author | TypeScript Team <noreply@google.com> | Mon Jul 01 17:43:42 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Jul 01 17:43:58 2019 -0700 |
tree | 129decd43f27b0a59ad130be96865ec160dfed03 | |
parent | 03416110c68c443e69bb909c4e09f4c065df5041 [diff] |
Make ts_compile_actions callable from aspects. This adds fallbacks for cases where a certain attribute isn't present on ctx: - ctx.attr.compiler falls back to ctx.attr._compiler - ctx.attr.generate_externs defaults to True - ctx.attr.runtime defaults to "browser" - ctx.attr.module_name defaults to None It also defines an attribute dict for aspects that define a lot of the necessary attributes for compilation (similar to TS_LIB_DECL_ATTRIBUTES). Finally, it allows callers of compile_ts or ts_compile_actions to define their own tsconfig output instead o getting it from ctx.outputs (since aspects cannot have outputs). PiperOrigin-RevId: 256070225
This repo contains a mirror of some Google-internal bits that support TypeScript development under Bazel.
It contains these utilities:
ts_devserver
: a Go library and binary that runs a fast local web server which concatenates JavaScript on-the-fly. It requires inputs in a named module format (module ids must be contained in the file, not inferred from the file's path).ts_auto_deps
: a Go library and binary which generates BUILD.bazel
files from TypeScript sources.tsc_wrapped
: a TypeScript program which wraps the TypeScript compiler, hosting it under a Bazel worker.tsetse
: a collection of third-party “strictness” checks which we add to the TypeScript compiler.internal/common/*.bzl
: some Starlark utility code for running the ts_library
rule.There are no user-facing bits in this repo. These utilities are consumed in https://github.com/bazelbuild/rules_nodejs/tree/master/packages/typescript
Please file issues for ts_library
rule and other Bazel rules in that repo.