feat: bun_script
Some checks failed
CI / test (ubuntu-latest, linux-x64) (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
parent 66884263b7
commit a9e2be6f63
16 changed files with 214 additions and 9 deletions

View File

@@ -10,6 +10,7 @@ stardoc(
"bun_binary",
"bun_bundle",
"bun_dev",
"bun_script",
"bun_test",
"js_library",
"ts_library",

View File

@@ -26,6 +26,18 @@ Attributes:
- `data` (label_list, optional): additional runtime files for dev process.
- `working_dir` (string, default: `"workspace"`, values: `"workspace" | "entry_point"`): runtime working directory.
## bun_script
Runs a named `package.json` script with Bun as an executable target (`bazel run`).
Attributes:
- `script` (string, required): package script name passed to `bun run <script>`.
- `package_json` (label, required): `package.json` file containing the named script.
- `node_modules` (label, optional): Bun/npm package files in runfiles.
- `data` (label_list, optional): additional runtime files for the script.
- `working_dir` (string, default: `"package"`, values: `"workspace" | "package"`): runtime working directory.
## bun_bundle
Bundles one or more JS/TS entry points with Bun build.