forked from angular/dev-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.bzl
43 lines (39 loc) · 1.69 KB
/
package.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
stampSubstitutions = {
# The variables are special statuses generated within the Bazel workspace
# status command stamping script.
"{SCM_HEAD_SHA}": "{BUILD_SCM_COMMIT_SHA}",
}
noStampSubstitutions = dict(stampSubstitutions, **{})
basePackageSubstitutions = {
" \"prepare\": \"husky install\",\n": "",
"@dev-infra//bazel/": "@npm//@angular/build-tooling/bazel/",
"rlocation \"dev-infra/": "rlocation \"npm/@angular/build-tooling/",
"//bazel/": "@npm//@angular/build-tooling/bazel/",
"//bazel:": "@npm//@angular/build-tooling/bazel:",
"//lint-rules/tslint/": "@npm//@angular/build-tooling/tslint/",
"//lint-rules/tslint:": "@npm//@angular/build-tooling/tslint:",
"//lint-rules/stylelint/": "@npm//@angular/build-tooling/stylelint/",
"//lint-rules/stylelint:": "@npm//@angular/build-tooling/stylelint:",
"//shared-scripts/": "@npm//@angular/build-tooling/shared-scripts/",
"//shared-scripts:": "@npm//@angular/build-tooling/shared-scripts:",
"//:tsconfig.json": "@npm//@angular/build-tooling:tsconfig.json",
}
NPM_PACKAGE_SUBSTITUTIONS = select({
"//tools:stamp": dict(basePackageSubstitutions, **stampSubstitutions),
"//conditions:default": dict(basePackageSubstitutions, **noStampSubstitutions),
})
# These packages are allowed to use macros from `defaults.bzl`. This is a
# little safety improvement to avoid accidentally relying on the defaults
# which are not available when the dev-infra tooling is consumed.
BZL_DEFAULTS_ALLOW_PACKAGES = [
".github/local-actions",
"",
"apps",
"bazel/browsers/update-script",
"circleci-orb",
"github-actions",
"ng-dev",
"tools",
"lint-rules/tslint",
"lint-rules/stylelint",
]