blob: 5ed1769c529158c93faba7fea73cedb58b570c54 [file] [log] [blame]
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(),
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-patches:compile\" > $@ && cat $(execpath :fs.cjs) >> $@",
visibility = ["//js/private/node-patches:__pkg__"],
)