1
1
load ("@npm//@angular/build-tooling/bazel/api-golden:index.bzl" , "api_golden_test_npm_package" )
2
2
load ("@npm//@bazel/jasmine:index.bzl" , "jasmine_node_test" )
3
- load ("//tools:defaults.bzl" , "pkg_npm" )
4
- load ("//tools:interop.bzl" , "ts_project" )
3
+ load ("//tools:defaults2.bzl" , "npm_package" , "ts_project" )
5
4
6
5
# Copyright Google Inc. All Rights Reserved.
7
6
#
@@ -11,7 +10,14 @@ package(default_visibility = ["//visibility:public"])
11
10
12
11
licenses (["notice" ])
13
12
14
- # @angular-devkit/core
13
+ RUNTIME_ASSETS = glob (
14
+ include = ["**/*.json" ],
15
+ # NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
16
+ exclude = [
17
+ "node_modules/**" ,
18
+ "src/workspace/json/test/**" ,
19
+ ],
20
+ )
15
21
16
22
ts_project (
17
23
name = "core" ,
@@ -21,14 +27,7 @@ ts_project(
21
27
"src/**/*_spec.ts" ,
22
28
],
23
29
) + ["index.ts" ],
24
- data = glob (
25
- include = ["**/*.json" ],
26
- # NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
27
- exclude = [
28
- "node_modules/**" ,
29
- "src/workspace/json/test/**" ,
30
- ],
31
- ),
30
+ data = RUNTIME_ASSETS ,
32
31
module_name = "@angular-devkit/core" ,
33
32
deps = [
34
33
"//:root_modules/@types/node" ,
@@ -73,15 +72,15 @@ genrule(
73
72
cmd = "cp $(execpath //:LICENSE) $@" ,
74
73
)
75
74
76
- pkg_npm (
77
- name = "npm_package " ,
75
+ npm_package (
76
+ name = "pkg " ,
78
77
tags = ["release-package" ],
79
- deps = [
78
+ deps = RUNTIME_ASSETS + [
80
79
":README.md" ,
81
- ":core " ,
80
+ ":core_rjs " ,
82
81
":license" ,
83
- "//packages/angular_devkit/core/node" ,
84
- "//packages/angular_devkit/core/node/testing" ,
82
+ "//packages/angular_devkit/core/node:node_rjs " ,
83
+ "//packages/angular_devkit/core/node/testing:testing_rjs " ,
85
84
],
86
85
)
87
86
0 commit comments