blob: ae06e171af35694511482fa41db95db2525ff4b5 [file] [log] [blame]
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
package(default_visibility = ["//visibility:public"])
exports_files([
"node_modules/protobufjs/dist/minimal/protobuf.min.js",
# Exported to be consumed for generating skydoc.
"ts_proto_library.bzl",
])
nodejs_binary(
name = "pbjs",
data = [
"@build_bazel_rules_typescript_protobufs_compiletime_deps//protobufjs",
# these deps are needed even tho they are not automatic transitive deps of
# protobufjs since if they are not in the runfiles then protobufjs attempts to
# run `npm install` at runtime to get thhem which fails as it tries to access
# the npm cache outside of the sandbox
"@build_bazel_rules_typescript_protobufs_compiletime_deps//semver",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//chalk",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//glob",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//jsdoc",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//minimist",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//tmp",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//uglify-js",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//espree",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//escodegen",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//estraverse",
],
entry_point = "protobufjs/bin/pbjs",
install_source_map_support = False,
)
nodejs_binary(
name = "pbts",
data = [
"@build_bazel_rules_typescript_protobufs_compiletime_deps//protobufjs",
# these deps are needed even tho they are not automatic transitive deps of
# protobufjs since if they are not in the runfiles then protobufjs attempts to
# run `npm install` at runtime to get thhem which fails as it tries to access
# the npm cache outside of the sandbox
"@build_bazel_rules_typescript_protobufs_compiletime_deps//semver",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//chalk",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//glob",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//jsdoc",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//minimist",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//tmp",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//uglify-js",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//espree",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//escodegen",
"@build_bazel_rules_typescript_protobufs_compiletime_deps//estraverse",
],
entry_point = "protobufjs/bin/pbts",
install_source_map_support = False,
)