~bigbes/game-prototype-ftl

62c4b374f99b966daef9103611f268a85bafd134 — Eugene Blikh 6 days ago 1b674aa
chore(build): replace Makefile with Justfile

Switch the build tooling from make to just.

- Remove Makefile.
- Add Justfile with run, build, build-wasm, serve, and play-web recipes.
2 files changed, 28 insertions(+), 26 deletions(-)

A Justfile
D Makefile
A Justfile => Justfile +28 -0
@@ 0,0 1,28 @@
default:
    @just --list

run:
    go run .

build:
    mkdir -p bin
    go build -o bin/ftl-shape .

build-wasm:
    mkdir -p web
    GOOS=js GOARCH=wasm go build -o web/main.wasm .
    cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" web/wasm_exec.js

serve:
    go run github.com/hajimehoshi/wasmserve@latest .

play-web:
    #!/usr/bin/env bash
    mkdir -p web
    case "$(uname -s)" in
      Darwin) OPEN_CMD=open ;;
      Linux)  OPEN_CMD=xdg-open ;;
      *)      OPEN_CMD=: ;;
    esac
    ( sleep 1 && $OPEN_CMD http://localhost:8080 ) &
    go run github.com/hajimehoshi/wasmserve@latest .

D Makefile => Makefile +0 -26
@@ 1,26 0,0 @@
.PHONY: run build build-wasm serve play-web

run:
	go run .

build:
	@mkdir -p bin
	go build -o bin/ftl-shape .

build-wasm:
	@mkdir -p web
	GOOS=js GOARCH=wasm go build -o web/main.wasm .
	cp "$$(go env GOROOT)/lib/wasm/wasm_exec.js" web/wasm_exec.js

serve:
	go run github.com/hajimehoshi/wasmserve@latest .

play-web:
	@mkdir -p web
	@case "$$(uname -s)" in \
	  Darwin) OPEN_CMD=open ;; \
	  Linux)  OPEN_CMD=xdg-open ;; \
	  *)      OPEN_CMD=: ;; \
	esac; \
	( sleep 1 && $$OPEN_CMD http://localhost:8080 ) & \
	go run github.com/hajimehoshi/wasmserve@latest .