blob: 3de90d7dae6c3b6b45c883160ba15a8bd68f3a1d [file]
load("@npm//:typescript/package_json.bzl", typescript_bin = "bin")
typescript_bin.tsc(
name = "compile",
srcs = [
"fs.cts",
"tsconfig.json",
"//:node_modules/@types/node",
],
outs = [
"fs.cjs",
],
args = [
"-p",
"tsconfig.json",
],
chdir = package_name(),
silent_on_success = False,
visibility = ["//js/private/test/node-patches:__pkg__"],
)
genrule(
name = "fs_generated",
srcs = ["fs.cjs"],
outs = ["fs-generated.cjs"],
cmd = "echo \"// Generated by //js/private/node-bootstrap:compile\" > $@ && cat $(execpath :fs.cjs) >> $@",
visibility = ["//js/private/node-bootstrap:__pkg__"],
)