-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates typescript_proto_library to use an aspect that can generate t…
…ransitive dependencies. (#138)
- Loading branch information
1 parent
a7b6422
commit 14d69f6
Showing
25 changed files
with
9,547 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ lib/ | |
**/mocha-report.json | ||
bazel-* | ||
protoc/ | ||
.ijwb/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
|
||
exports_files(["tsconfig.json"]) | ||
exports_files([ | ||
"tsconfig.json", | ||
"node_modules/google-protobuf/google-protobuf.js", | ||
]) | ||
|
||
filegroup( | ||
name = "generate_ts", | ||
srcs = [ | ||
"//proto:generate", | ||
"//proto/examplecom:generate", | ||
"//proto/othercom:generate", | ||
], | ||
name = "generate_ts", | ||
srcs = [ | ||
"//proto:generate", | ||
"//proto/examplecom:generate", | ||
"//proto/othercom:generate", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,46 @@ | ||
workspace(name = "ts_protoc_gen") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
git_repository( | ||
name = "io_bazel_rules_go", | ||
commit = "6bee898391a42971289a7989c0f459ab5a4a84dd", # master as of May 10th, 2018 | ||
remote = "https://github.com/bazelbuild/rules_go.git", | ||
http_archive( | ||
name = "build_bazel_rules_typescript", | ||
sha256 = "e4f51c408ed3278a3a1dd227564a69f293ae2ac4ae1564b3a6d2637ae9447b47", | ||
strip_prefix = "rules_typescript-0.21.0", | ||
urls = ["https://github.com/bazelbuild/rules_typescript/archive/0.21.0.zip"], | ||
) | ||
|
||
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies") | ||
|
||
rules_typescript_dependencies() | ||
|
||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") | ||
|
||
ts_setup_workspace() | ||
|
||
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install") | ||
|
||
node_repositories() | ||
|
||
yarn_install( | ||
name = "npm", | ||
package_json = "//:package.json", | ||
yarn_lock = "//:yarn.lock", | ||
) | ||
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") | ||
|
||
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies") | ||
|
||
go_rules_dependencies() | ||
|
||
go_register_toolchains() | ||
|
||
http_archive( | ||
name = "io_bazel_rules_webtesting", | ||
strip_prefix = "rules_webtesting-master", | ||
urls = [ | ||
"https://github.com/bazelbuild/rules_webtesting/archive/master.tar.gz", | ||
], | ||
) | ||
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories") | ||
|
||
web_test_repositories() | ||
|
||
git_repository( | ||
name = "build_bazel_rules_nodejs", | ||
remote = "https://github.com/bazelbuild/rules_nodejs.git", | ||
commit = "d334fd8e2274fb939cf447106dced97472534e80", | ||
browser_repositories( | ||
chromium = True, | ||
) | ||
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories") | ||
node_repositories(package_json = ["//:package.json"]) | ||
|
||
load("@ts_protoc_gen//:defs.bzl", "typescript_proto_dependencies") | ||
typescript_proto_dependencies() | ||
|
||
git_repository( | ||
name = "build_bazel_rules_typescript", | ||
remote = "https://github.com/bazelbuild/rules_typescript.git", | ||
commit = "3488d4fb89c6a02d79875d217d1029182fbcd797", | ||
) | ||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace") | ||
ts_setup_workspace() | ||
typescript_proto_dependencies() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package(default_visibility=["//visibility:public"]) | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") | ||
|
||
nodejs_binary( | ||
name = "protoc-gen-ts", | ||
node_modules = "@deps//:node_modules", | ||
args = ["--node_options=--expose-gc"], | ||
data = [ | ||
"//src:src", | ||
"//src", | ||
], | ||
entry_point = "ts_protoc_gen/src/index", | ||
args = ["--node_options=--expose-gc"], | ||
node_modules = "@ts_protoc_gen_deps//:node_modules", | ||
) |
Oops, something went wrong.