Skip to content

Commit

Permalink
refactor: move ts_proto_library to @bazel/labs
Browse files Browse the repository at this point in the history
We don't intend to fully support this for 1.0
Also remove a nested install, by vendoring the one file we need for ts_devserver

Fixes #1152
Fixes #1151
  • Loading branch information
alexeagle committed Sep 20, 2019
1 parent d846f45 commit 7b51f9d
Show file tree
Hide file tree
Showing 24 changed files with 3,539 additions and 75 deletions.
2 changes: 2 additions & 0 deletions examples/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ example_integration_test(

example_integration_test(
name = "examples_protocol_buffers",
timeout = "long",
npm_packages = {
"//packages/hide-bazel-files:npm_package": "@bazel/hide-bazel-files",
"//packages/karma:npm_package": "@bazel/karma",
"//packages/labs:npm_package": "@bazel/labs",
"//packages/protractor:npm_package": "@bazel/protractor",
"//packages/typescript:npm_package": "@bazel/typescript",
},
Expand Down
9 changes: 5 additions & 4 deletions examples/protocol_buffers/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server", "rollup_bundle")
load("@npm_bazel_labs//:index.bzl", "ts_proto_library")
load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
load("@npm_bazel_typescript//:index.bzl", "ts_config", "ts_devserver", "ts_library", "ts_proto_library")
load("@npm_bazel_typescript//:index.bzl", "ts_config", "ts_devserver", "ts_library")
load("//:defaults.bzl", "ts_web_test_suite")

proto_library(
Expand Down Expand Up @@ -44,7 +45,7 @@ ts_library(

ts_web_test_suite(
name = "test",
bootstrap = ["@npm_bazel_typescript//:protobufjs_bootstrap_scripts"],
bootstrap = ["@npm_bazel_labs//protobufjs:bootstrap_scripts"],
browsers = [
"@io_bazel_rules_webtesting//browsers:chromium-local",
"@io_bazel_rules_webtesting//browsers:firefox-local",
Expand All @@ -61,7 +62,7 @@ ts_library(

ts_devserver(
name = "devserver",
bootstrap = ["@npm_bazel_typescript//:protobufjs_bootstrap_scripts"],
bootstrap = ["@npm_bazel_labs//protobufjs:bootstrap_scripts"],
entry_module = "examples_protocol_buffers/app",
deps = [":bundle"],
)
Expand All @@ -71,7 +72,7 @@ rollup_bundle(
name = "bundle",
enable_code_splitting = False,
entry_point = ":app.ts",
# TODO(alexeagle): we should be able to get this from //:protobufjs_bootstrap_scripts
# TODO(alexeagle): we should be able to get this from protobufjs:bootstrap_scripts
# and automatically plumb it through to Rollup.
globals = {
"long": "Long",
Expand Down
4 changes: 4 additions & 0 deletions examples/protocol_buffers/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies")

rules_karma_dependencies()

load("@npm_bazel_labs//:package.bzl", "npm_bazel_labs_dependencies")

npm_bazel_labs_dependencies()

load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")

web_test_repositories()
Expand Down
1 change: 1 addition & 0 deletions examples/protocol_buffers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"devDependencies": {
"@bazel/hide-bazel-files": "latest",
"@bazel/karma": "latest",
"@bazel/labs": "latest",
"@bazel/protractor": "latest",
"@bazel/typescript": "latest",
"@types/jasmine": "2.8.2",
Expand Down
Loading

0 comments on commit 7b51f9d

Please sign in to comment.