angular-cn/dev-infra
Paul Gschwendtner 9af5abba86 feat(dev-infra): add bazel rule for extracting JavaScript module flavors from targets (#42809)
Introduces a rule that collects declared JavaScript module output files
from a list of dependencies based on a configurable JavaScript module
provider. The extracted outputs are exposed within the `DefaultInfo` provider.

Targets defined using this rule can be used as input for rules that
require JavaScript sources, or if there are multiple JavaScript output
variants defined for a target while for example only the `JSModuleInfo`
outputs are of interest.

As an example: This rule is helpful in combination with `ts_library` and
`ng_module` as those rule expose multiple output flavors (which are
distinguishable by the JavaScript module providers as imported from `providers.bzl`).
i.e. these rules expose flavors for named AMD modules and ECMAScript module output.
If we want to ship a NPM package only using ECMAScript modules for
example, we could extract all `JSEcmaScriptModuleInfo`-denoted output
and feed that into the `pkg_npm` rule, compared to bringing in all
output flavors.

For reference:
https://github.com/bazelbuild/rules_nodejs/blob/stable/packages/typescript/internal/build_defs.bzl#L334-L337

PR Close #42809
2021-07-12 09:42:01 -07:00
..
bazel feat(dev-infra): add bazel rule for extracting JavaScript module flavors from targets (#42809) 2021-07-12 09:42:01 -07:00
benchmark build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
caretaker build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
commit-message build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
format build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
misc build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
ngbot build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
pr build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
pullapprove build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
release build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
ts-circular-dependencies build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
utils build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
BUILD.bazel build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
build-worker.js refactor(dev-infra): update octokit to latest version v18 (#42666) 2021-06-29 10:33:54 -07:00
cli.ts feat(dev-infra): add `ng-dev build-and-link` command (#42319) 2021-05-25 22:11:03 +00:00
commit-message-filter.js refactor(dev-infra): create ng-dev executable locally in the repo (#39089) 2020-10-22 13:36:14 -07:00
defaults.bzl build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
index.bzl build: update to rules_nodejs v4.0.0-beta.0 (#42760) 2021-07-09 14:50:15 -07:00
ng-dev.js fix(dev-infra): convert commit SHAs and PR numbers to links when generating changelog (#42732) 2021-07-02 09:23:45 -07:00
tmpl-package.json feat(dev-infra): introduce shared tool for validating API signature (#42688) 2021-06-30 11:43:48 -07:00
tsconfig.json feat(dev-infra): introduce shared tool for validating API signature (#42688) 2021-06-30 11:43:48 -07:00