mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 14:02:43 +08:00
build: migrate @angular-devkit/build-webpack
to ts_project
The `@angular-devkit/build-webpack` package has been migrated to the `rules_js` ts_project rule.
This commit is contained in:
parent
4bef5a25ae
commit
b4e9a2af9e
@ -5,7 +5,8 @@
|
|||||||
|
|
||||||
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
|
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
|
||||||
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
|
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
|
||||||
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
|
load("//tools:defaults.bzl", "pkg_npm")
|
||||||
|
load("//tools:interop.bzl", "ts_project")
|
||||||
load("//tools:ts_json_schema.bzl", "ts_json_schema")
|
load("//tools:ts_json_schema.bzl", "ts_json_schema")
|
||||||
|
|
||||||
licenses(["notice"])
|
licenses(["notice"])
|
||||||
@ -22,14 +23,13 @@ ts_json_schema(
|
|||||||
src = "src/builders/webpack-dev-server/schema.json",
|
src = "src/builders/webpack-dev-server/schema.json",
|
||||||
)
|
)
|
||||||
|
|
||||||
ts_library(
|
ts_project(
|
||||||
name = "build_webpack",
|
name = "build_webpack",
|
||||||
package_name = "@angular-devkit/build-webpack",
|
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
include = ["src/**/*.ts"],
|
include = ["src/**/*.ts"],
|
||||||
exclude = [
|
exclude = [
|
||||||
"src/test-utils.ts",
|
"src/test-utils.ts",
|
||||||
"src/**/*_spec.ts",
|
"**/*_spec.ts",
|
||||||
],
|
],
|
||||||
) + [
|
) + [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
@ -42,18 +42,19 @@ ts_library(
|
|||||||
"src/builders/webpack-dev-server/schema.json",
|
"src/builders/webpack-dev-server/schema.json",
|
||||||
"src/builders/webpack/schema.json",
|
"src/builders/webpack/schema.json",
|
||||||
],
|
],
|
||||||
module_name = "@angular-devkit/build-webpack",
|
interop_deps = [
|
||||||
module_root = "src/index.d.ts",
|
|
||||||
deps = [
|
|
||||||
"//packages/angular_devkit/architect",
|
"//packages/angular_devkit/architect",
|
||||||
"@npm//@types/node",
|
],
|
||||||
"@npm//rxjs",
|
module_name = "@angular-devkit/build-webpack",
|
||||||
"@npm//webpack",
|
deps = [
|
||||||
"@npm//webpack-dev-server",
|
"//:root_modules/@types/node",
|
||||||
|
"//:root_modules/rxjs",
|
||||||
|
"//:root_modules/webpack",
|
||||||
|
"//:root_modules/webpack-dev-server",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
ts_library(
|
ts_project(
|
||||||
name = "build_webpack_test_lib",
|
name = "build_webpack_test_lib",
|
||||||
testonly = True,
|
testonly = True,
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
@ -66,34 +67,32 @@ ts_library(
|
|||||||
"test/**/*",
|
"test/**/*",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
deps = [
|
interop_deps = [
|
||||||
":build_webpack",
|
|
||||||
"//packages/angular_devkit/architect",
|
|
||||||
"//packages/angular_devkit/architect/node",
|
|
||||||
"//packages/angular_devkit/architect/testing",
|
|
||||||
"//packages/angular_devkit/core",
|
"//packages/angular_devkit/core",
|
||||||
"//packages/angular_devkit/core/node",
|
"//packages/angular_devkit/core/node",
|
||||||
"//packages/ngtools/webpack",
|
"//packages/ngtools/webpack",
|
||||||
"@npm//@angular/common",
|
"//packages/angular_devkit/architect",
|
||||||
"@npm//@angular/compiler",
|
"//packages/angular_devkit/architect/node",
|
||||||
"@npm//@angular/compiler-cli",
|
"//packages/angular_devkit/architect/testing",
|
||||||
"@npm//@angular/core",
|
],
|
||||||
"@npm//@angular/platform-browser",
|
deps = [
|
||||||
"@npm//@angular/platform-browser-dynamic",
|
":build_webpack_rjs",
|
||||||
"@npm//tslib",
|
"//:root_modules/@types/jasmine",
|
||||||
"@npm//zone.js",
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
jasmine_node_test(
|
jasmine_node_test(
|
||||||
name = "build_webpack_test",
|
name = "build_webpack_test",
|
||||||
srcs = [":build_webpack_test_lib"],
|
srcs = [":build_webpack_test_lib"],
|
||||||
# Turns off nodejs require patches and turns on the linker, which sets up up node_modules
|
data = [
|
||||||
# so that standard node module resolution work.
|
"//:root_modules/@angular/common",
|
||||||
templated_args = ["--nobazel_patch_module_resolver"],
|
"//:root_modules/@angular/compiler",
|
||||||
deps = [
|
"//:root_modules/@angular/compiler-cli",
|
||||||
"@npm//jasmine",
|
"//:root_modules/@angular/core",
|
||||||
"@npm//source-map",
|
"//:root_modules/@angular/platform-browser",
|
||||||
|
"//:root_modules/@angular/platform-browser-dynamic",
|
||||||
|
"//:root_modules/tslib",
|
||||||
|
"//:root_modules/zone.js",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user