blob: d0a0fc3ea89995544b6e6582de51cf270d050f7f [file]
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_test")
load("@npm//google-closure-compiler:index.bzl", "google_closure_compiler")
google_closure_compiler(
name = "closure",
outs = ["bundle.js"],
args = [
# workaround https://github.com/google/closure-compiler-npm/issues/147
# --platform native would be faster but is failing on Windows
"--platform=javascript",
"--js=$(execpath hello.js)",
"--js_output_file=$@",
],
data = ["hello.js"],
)
nodejs_test(
name = "test",
data = [
"bundle.js",
"@npm//@bazel/runfiles",
],
entry_point = "test.js",
)