build: idiomatic install of @angular/bazel npm package (#26258)

This commit is contained in:
Greg Magolan
2018-10-16 13:20:00 -07:00
committed by Alex Eagle
parent 31632b27c7
commit 652ac79d63
27 changed files with 4118 additions and 3621 deletions

View File

@ -9,9 +9,11 @@ local_repository(
path = "../..",
)
local_repository(
http_archive(
name = "rxjs",
path = "node_modules/rxjs/src",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
strip_prefix = "package/src",
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
)
load("@angular//packages/bazel:package.bzl", "rules_angular_dependencies")
@ -26,15 +28,14 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi
check_bazel_version("0.17.0")
node_repositories(
package_json = ["//:package.json"],
node_version = "10.9.0",
yarn_version = "1.9.2",
)
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
package_json = "//src:package.json",
yarn_lock = "//src:yarn.lock",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")

View File

@ -4,23 +4,9 @@
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"reflect-metadata": "0.1.12",
"rxjs": "6.0.0",
"tslib": "1.9.3",
"zone.js": "0.8.26"
},
"devDependencies": {
"@bazel/karma": "0.20.2",
"@bazel/typescript": "0.20.2",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",
"shelljs": "^0.8.2",
"tsickle": "0.32.0",
"typescript": "3.0.1"
},
"scripts": {
"//": "TODO(gmagolan): figure out how to keep dependencies here up to date with the root package.json",
"//": "deps are listed in src/package.json which is used by yarn_install",
"test": "bazel build ... --noshow_progress && bazel test ..."
}
}

View File

@ -0,0 +1,27 @@
{
"name": "angular-bazel",
"description": "example and integration test for building Angular apps with Bazel",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"reflect-metadata": "0.1.12",
"rxjs": "6.3.3",
"tslib": "1.9.3",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/bazel": "file:../angular/dist/packages-dist/bazel",
"@angular/compiler": "file:../angular/dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../angular/dist/packages-dist/compiler-cli",
"@bazel/karma": "0.20.2",
"@bazel/typescript": "0.20.2",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",
"tsickle": "0.32.0",
"typescript": "3.1.1"
},
"scripts": {
"//": "TODO(gregmagolan): figure out how to keep dependencies here up to date with the root package.json"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ ts_library(
srcs = ["on-prepare.ts"],
tsconfig = ":tsconfig.json",
deps = [
"@angular//packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//@types",
"@npm//protractor",
],
@ -28,7 +28,7 @@ protractor_web_test_suite(
name = "devserver_test",
configuration = "//:protractor.conf.js",
data = [
"@angular//packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//protractor",
],
on_prepare = ":ts_on_prepare",
@ -40,7 +40,7 @@ protractor_web_test_suite(
name = "prodserver_test",
configuration = "//:protractor.conf.js",
data = [
"@angular//packages/bazel/src/protractor/utils",
"@npm//@angular/bazel",
"@npm//protractor",
],
on_prepare = ":ts_on_prepare",

File diff suppressed because it is too large Load Diff