2020-03-04 12:42:45 -05:00
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
|
|
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_library")
|
2020-03-04 17:37:21 -05:00
|
|
|
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
|
2020-03-04 12:42:45 -05:00
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "cli",
|
|
|
|
srcs = [
|
|
|
|
"cli.ts",
|
|
|
|
],
|
|
|
|
deps = [
|
2020-03-04 17:37:21 -05:00
|
|
|
"//dev-infra/pullapprove",
|
2020-03-04 12:42:45 -05:00
|
|
|
"@npm//@types/node",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-03-04 17:37:21 -05:00
|
|
|
rollup_bundle(
|
|
|
|
name = "bundle",
|
|
|
|
config_file = "rollup.config.js",
|
|
|
|
entry_point = ":cli.ts",
|
|
|
|
format = "umd",
|
|
|
|
sourcemap = "hidden",
|
|
|
|
deps = [
|
|
|
|
":cli",
|
|
|
|
"@npm//rollup-plugin-commonjs",
|
|
|
|
"@npm//rollup-plugin-node-resolve",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-03-04 12:42:45 -05:00
|
|
|
pkg_npm(
|
|
|
|
name = "npm_package",
|
|
|
|
srcs = [
|
|
|
|
"package.json",
|
|
|
|
],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2020-03-04 17:37:21 -05:00
|
|
|
":bundle",
|
2020-03-04 12:42:45 -05:00
|
|
|
],
|
|
|
|
)
|