The major one that affects the angular repo is the removal of the bootstrap attribute in nodejs_binary, nodejs_test and jasmine_node_test in favor of using templated_args --node_options=--require=/path/to/script. The side-effect of this is that the bootstrap script does not get the require.resolve patches with explicitly loading the targets _loader.js file. PR Close #34736
53 lines
1.1 KiB
Python
53 lines
1.1 KiB
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_config")
|
|
|
|
ts_config(
|
|
name = "tsconfig",
|
|
src = "tsconfig-build.json",
|
|
deps = ["//packages:tsconfig-build.json"],
|
|
)
|
|
|
|
ts_library(
|
|
name = "ng-add",
|
|
srcs = [
|
|
"index.ts",
|
|
"schema.d.ts",
|
|
],
|
|
data = glob(["files/**/*"]) + [
|
|
"schema.json",
|
|
],
|
|
tsconfig = ":tsconfig",
|
|
deps = [
|
|
"@npm//@angular-devkit/core",
|
|
"@npm//@angular-devkit/schematics",
|
|
"@npm//@schematics/angular",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "test_lib",
|
|
testonly = True,
|
|
srcs = [
|
|
"index_spec.ts",
|
|
],
|
|
data = [
|
|
"//packages/localize/schematics:package_assets",
|
|
],
|
|
deps = [
|
|
":ng-add",
|
|
"@npm//@angular-devkit/schematics",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "test",
|
|
templated_args = ["--node_options=--require=$(rlocation $(location //tools/testing:node_es5))"],
|
|
deps = [
|
|
":test_lib",
|
|
"//tools/testing:node",
|
|
"//tools/testing:node_es5",
|
|
],
|
|
)
|