forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
55 lines (48 loc) · 1.18 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
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
# BEGIN-DEV-ONLY
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "lib",
srcs = glob(["*.ts"]),
node_modules = "@npm//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
deps = [
"@npm//@types/node",
"@npm//@types/shelljs",
],
)
# END-DEV-ONLY
nodejs_binary(
name = "packager",
data = [
"lib",
"@npm//shelljs",
],
entry_point = ":packager.ts",
install_source_map_support = False,
)
nodejs_binary(
name = "rollup_for_ng_package",
data = [
"@npm//rollup",
"@npm//rollup-plugin-commonjs",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-sourcemaps",
],
entry_point = "@npm//:node_modules/rollup/dist/bin/rollup",
install_source_map_support = False,
)
exports_files([
"ng_package.bzl",
"rollup.config.js",
"terser_config.default.json",
])
filegroup(
name = "package_assets",
srcs = glob(["*.bzl"]) + [
"BUILD.bazel",
"rollup.config.js",
"terser_config.default.json",
],
)