Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export bazel build rules for googleapis #511

Merged
merged 4 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Allow any ts_library rules in this workspace to reference the config
exports_files(["tsconfig.json"], visibility = ["//:__subpackages__"])

package(default_visibility = ["//visibility:public"])

exports_files(["tsconfig.json"], visibility = ["//visibility:public"])

load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary", "nodejs_test")
load("@npm_bazel_typescript//:index.bzl", "ts_project", "ts_config")
load("@npm_bazel_labs//:index.bzl", "protobufjs_ts_library")
Expand Down Expand Up @@ -110,23 +109,21 @@ npm_compile_dependencies = npm_test_dependencies + [
"@npm//@types/object-hash",
"@npm//@types/sinon",
"@npm//@types/yargs",
"@npm//gts",
]

ts_project(
name = "compile",
srcs = glob([
"src/**/*.ts",
"test/**/*.ts",
"tools/**/*.ts",
"index.d.ts"
]),
"src/**/*.ts",
"test/**/*.ts",
"tools/**/*.ts",
"index.d.ts",
]),
tsconfig = "//:tsconfig.json",
extends = ["@npm//:node_modules/gts/tsconfig-google.json"],
source_map = True,
declaration = True,
deps = [
":protos",
"//:protos"
] + npm_compile_dependencies,
)

Expand Down
12 changes: 4 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_
rules_proto_dependencies()
rules_proto_toolchains()

load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "npm_install", "yarn_install")
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

npm_install(
yarn_install(
name = "npm",
package_json = "//:package.json",
package_lock_json = "//:package-lock.json",
yarn_lock = "//:yarn.lock",
)

# Install any Bazel rules which were extracted earlier by the npm_install rule.
# Install any Bazel rules which were extracted earlier by the yarn_install rule.
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()

Expand All @@ -52,8 +52,4 @@ yarn_install(
name = "build_bazel_rules_typescript_protobufs_compiletime_deps",
package_json = "@npm_bazel_labs//protobufjs:package.json",
yarn_lock = "@npm_bazel_labs//protobufjs:yarn.lock",
# Do not symlink node_modules as when used in downstream repos we should not create
# node_modules folders in the @npm_bazel_typescript external repository. This is
# not supported by managed_directories.
symlink_node_modules = False,
)
Loading