Skip to content

Commit 81fd12d

Browse files
committed
build: migrate @angular-devkit/core to npm_package
Updates to the `rules_js` npm archive rule, as part of the overall migration effort. (cherry picked from commit 1486c63)
1 parent 50c9122 commit 81fd12d

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

packages/angular_devkit/core/BUILD.bazel

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
22
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")
54

65
# Copyright Google Inc. All Rights Reserved.
76
#
@@ -11,7 +10,14 @@ package(default_visibility = ["//visibility:public"])
1110

1211
licenses(["notice"])
1312

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+
)
1521

1622
ts_project(
1723
name = "core",
@@ -21,14 +27,7 @@ ts_project(
2127
"src/**/*_spec.ts",
2228
],
2329
) + ["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,
3231
module_name = "@angular-devkit/core",
3332
deps = [
3433
"//:root_modules/@types/node",
@@ -73,15 +72,15 @@ genrule(
7372
cmd = "cp $(execpath //:LICENSE) $@",
7473
)
7574

76-
pkg_npm(
77-
name = "npm_package",
75+
npm_package(
76+
name = "pkg",
7877
tags = ["release-package"],
79-
deps = [
78+
deps = RUNTIME_ASSETS + [
8079
":README.md",
81-
":core",
80+
":core_rjs",
8281
":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",
8584
],
8685
)
8786

0 commit comments

Comments
 (0)