54 lines
1.7 KiB
Python
54 lines
1.7 KiB
Python
module(
|
|
name = "rules_bun",
|
|
version = "0.2.2",
|
|
)
|
|
|
|
# Core ruleset dependencies.
|
|
bazel_dep(name = "platforms", version = "1.0.0")
|
|
bazel_dep(name = "rules_shell", version = "0.6.1")
|
|
bazel_dep(name = "bazel_skylib", version = "1.8.2")
|
|
bazel_dep(name = "stardoc", version = "0.7.2")
|
|
|
|
# Repository-local setup for this ruleset's own tests and examples.
|
|
bun_ext = use_extension("//bun:extensions.bzl", "bun")
|
|
use_repo(
|
|
bun_ext,
|
|
"bun_darwin_aarch64",
|
|
"bun_darwin_x64",
|
|
"bun_linux_aarch64",
|
|
"bun_linux_x64",
|
|
"bun_windows_x64",
|
|
)
|
|
|
|
# Test fixture dependency installation used by //tests/script_test.
|
|
bun_install_ext = use_extension("//bun:extensions.bzl", "bun_install")
|
|
bun_install_ext.install(
|
|
name = "script_test_vite_node_modules",
|
|
package_json = "//tests/script_test:vite_app/package.json",
|
|
bun_lockfile = "//tests/script_test:vite_app/bun.lock",
|
|
)
|
|
use_repo(bun_install_ext, "script_test_vite_node_modules")
|
|
|
|
bun_install_ext.install(
|
|
name = "script_test_vite_monorepo_node_modules",
|
|
package_json = "//tests/script_test:vite_monorepo/package.json",
|
|
bun_lockfile = "//tests/script_test:vite_monorepo/bun.lock",
|
|
)
|
|
use_repo(bun_install_ext, "script_test_vite_monorepo_node_modules")
|
|
|
|
bun_install_ext.install(
|
|
name = "examples_vite_monorepo_node_modules",
|
|
package_json = "//examples/vite_monorepo:package.json",
|
|
bun_lockfile = "//examples/vite_monorepo:bun.lock",
|
|
)
|
|
use_repo(bun_install_ext, "examples_vite_monorepo_node_modules")
|
|
|
|
# Register the published Bun toolchains for this repository.
|
|
register_toolchains(
|
|
"//bun:darwin_aarch64_toolchain",
|
|
"//bun:darwin_x64_toolchain",
|
|
"//bun:linux_aarch64_toolchain",
|
|
"//bun:linux_x64_toolchain",
|
|
"//bun:windows_x64_toolchain",
|
|
)
|