Modify justfile for bun build

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2025-12-25 03:01:15 +08:00
parent be3d778420
commit 43f95ba4af

View File

@@ -7,7 +7,10 @@ exec_path := join(output_dir, project_name)
go_cmd := `realpath $(which go)`
bun_cmd := `realpath $(which bun)`
default: clean build run
default: install clean build run
install:
cd {{ client_dir }} && {{ bun_cmd }} install
clean:
find .outputs -mindepth 1 ! -name config.yaml -exec rm -rf {} +
@@ -15,6 +18,7 @@ clean:
build:
mkdir -p {{ output_dir }}
{{ go_cmd }} build -o {{ exec_path }}{{ if os() == "windows" { ".exe" } else { "" } }} {{ server_enrty }}
cd {{ client_dir }} && {{ bun_cmd }} run build --outDir {{ join(output_dir, "static") }}
run:
cd {{ output_dir }} && CONFIG_PATH={{ output_dir }} {{ exec_path }}{{ if os() == "windows" { ".exe" } else { "" } }}