feat: bun_script
Some checks failed
CI / test (ubuntu-latest, linux-x64) (push) Failing after 39s
Docs Pages / deploy (push) Failing after 37s
CI / test (macos-14, darwin-arm64) (push) Has been cancelled
CI / test (windows-latest, windows) (push) Has been cancelled

This commit is contained in:
Eric
2026-03-06 19:51:52 +01:00
committed by eric
parent 5e8ec20b2e
commit d8e40f7df2
17 changed files with 222 additions and 111 deletions

View File

@@ -0,0 +1,33 @@
load("//bun:defs.bzl", "bun_script")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
bun_script(
name = "hello_script",
script = "hello",
package_json = "package.json",
data = ["hello.ts"],
)
sh_test(
name = "bun_script_ts_test",
srcs = ["run_script.sh"],
args = ["$(location :hello_script)", "hello-script"],
data = [":hello_script"],
)
bun_script(
name = "env_script",
script = "print-env",
package_json = "package.json",
data = [
".env",
"env.ts",
],
)
sh_test(
name = "bun_script_package_cwd_test",
srcs = ["run_env_script.sh"],
args = ["$(location :env_script)"],
data = [":env_script"],
)