|
1 | | -# BEGIN-DEV-ONLY |
2 | | -load("//tools:defaults.bzl", "pkg_npm") |
3 | | - |
4 | | -pkg_npm( |
5 | | - name = "npm_package", |
6 | | - package_name = "@angular/bazel", |
7 | | - srcs = glob( |
8 | | - ["*"], |
9 | | - exclude = ["yarn.lock"], |
10 | | - ) + [ |
11 | | - "//packages/bazel/src:package_assets", |
12 | | - "//packages/bazel/src/ng_module:package_assets", |
13 | | - "//packages/bazel/src/ng_package:package_assets", |
14 | | - "//packages/bazel/src/ngc-wrapped:package_assets", |
15 | | - "//packages/bazel/third_party/github.com/bazelbuild/bazel/src/main/protobuf:package_assets", |
16 | | - ], |
17 | | - substitutions = { |
18 | | - "(#|//)\\s+BEGIN-DEV-ONLY[\\w\\W]+?(#|//)\\s+END-DEV-ONLY": "", |
19 | | - # The partial compilation transition is applied in the user workspace. We do not want to require |
20 | | - # users having to define the build setting, so we directly point the flag label to the place where |
21 | | - # we expect `@angular/bazel` being located. Note: This expects the `@npm//` workspace to be used. |
22 | | - "//packages/bazel/src:partial_compilation": "@npm//@angular/bazel/src:partial_compilation", |
23 | | - # Substitutions to account for label changes when `@angular/bazel` is consumed externally. |
24 | | - # NodeJS binaries are pre-built and should be consumed through the NPM bin scripts of the package. |
25 | | - "//packages/bazel/": "//@angular/bazel/", |
26 | | - "@npm//@bazel/concatjs/internal:": "//@bazel/concatjs/internal:", |
27 | | - }, |
28 | | - # Do not add more to this list. |
29 | | - # Dependencies on the full npm_package cause long re-builds. |
30 | | - visibility = [ |
31 | | - "//integration:__subpackages__", |
32 | | - ], |
33 | | - deps = [ |
34 | | - "//packages/bazel/src/ng_package:lib", |
35 | | - "//packages/bazel/src/ngc-wrapped:ngc_lib", |
36 | | - ], |
37 | | -) |
38 | | -# END-DEV-ONLY |
0 commit comments