forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
93 lines (86 loc) · 2.41 KB
/
BUILD.bazel
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
load("@devinfra//bazel/api-golden:index_rjs.bzl", "api_golden_test_npm_package")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("//tools:defaults.bzl", "ng_package", "ts_project")
package(default_visibility = ["//visibility:public"])
npm_link_all_packages()
ts_project(
name = "ssr",
srcs = glob(
include = [
"*.ts",
"src/**/*.ts",
],
exclude = [
"**/*_spec.ts",
],
),
args = [
"--lib",
"dom,es2020",
],
data = [
"//packages/angular/ssr/third_party/beasties:beasties_bundled",
],
source_map = True,
tsconfig = "//:build-tsconfig-esm",
deps = [
"//:node_modules/@angular/common",
"//:node_modules/@angular/core",
"//:node_modules/@angular/platform-server",
"//:node_modules/@angular/router",
"//:node_modules/tslib",
"//packages/angular/ssr/third_party/beasties:beasties_dts",
],
)
ng_package(
name = "npm_package",
srcs = [
":package.json",
"//packages/angular/ssr/third_party/beasties:beasties_bundled",
],
externals = [
"@angular/ssr",
"@angular/ssr/node",
"../../third_party/beasties",
],
nested_packages = [
"//packages/angular/ssr/schematics:pkg",
# Included directly as the generated types reference the types file in this location.
"//packages/angular/ssr/third_party/beasties:beasties_dts",
],
package = "@angular/ssr",
rollup_runtime_deps = [
"//:node_modules/@rollup/plugin-commonjs",
"//:node_modules/@rollup/plugin-node-resolve",
"//:node_modules/magic-string",
"//:node_modules/rollup-plugin-dts",
"//:node_modules/rollup-plugin-sourcemaps2",
],
tags = ["release-package"],
deps = [
":ssr",
"//packages/angular/ssr/node",
],
)
pkg_tar(
name = "npm_package_archive",
srcs = [":npm_package"],
extension = "tgz",
strip_prefix = "./npm_package",
# should not be built unless it is a dependency of another rule
tags = ["manual"],
)
alias(
name = "pkg",
actual = ":npm_package",
)
api_golden_test_npm_package(
name = "ssr_api",
data = [
":npm_package",
"//goldens:public-api",
],
golden_dir = "goldens/public-api/angular/ssr",
npm_package = "packages/angular/ssr/npm_package",
)