mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Long code paths (e.g. Xcode target paths) broke layout by pushing the table beyond its container. Override white-space on td code to allow wrapping, and add overflow-x: auto as a safety net.
153 lines
4.7 KiB
TOML
153 lines
4.7 KiB
TOML
[tools]
|
|
go = "1.25.5"
|
|
pnpm = "10.28.0"
|
|
|
|
[tasks.help]
|
|
description = "Show common development tasks"
|
|
run = """
|
|
echo "Common tasks:"
|
|
echo " mise run build # build binary"
|
|
echo " mise run run # run local binary help"
|
|
echo " mise run test # unit + integration tests"
|
|
echo " mise run test:unit # unit tests only"
|
|
echo " mise run test:int # integration tests only"
|
|
echo " mise run test:cover # tests with coverage"
|
|
echo " mise run test:install # install.sh sandbox tests"
|
|
echo " mise run test:docker # docker offline sandbox (build + unit + integration)"
|
|
echo " mise run test:docker:online # optional docker online install/update tests"
|
|
echo " mise run sandbox:up # start persistent docker playground"
|
|
echo " mise run sandbox:bare # start playground without auto-init"
|
|
echo " mise run sandbox:shell # enter docker playground shell"
|
|
echo " mise run sandbox:down # stop and remove docker playground"
|
|
echo " mise run sandbox:reset # stop + remove playground volume (full reset)"
|
|
echo " mise run lint # go vet"
|
|
echo " mise run fmt # format Go files"
|
|
echo " mise run fmt:check # verify formatting only"
|
|
echo " mise run check # fmt:check + lint + test"
|
|
echo " mise run ui:install # install frontend dependencies"
|
|
echo " mise run ui:build # build frontend + copy to embed"
|
|
echo " mise run ui:dev # Go API server + Vite dev server"
|
|
echo " mise run build:all # ui:build + build (full binary)"
|
|
echo " mise run clean # remove build artifacts"
|
|
"""
|
|
|
|
[tasks.build]
|
|
description = "Build the skillshare binary"
|
|
run = """
|
|
if [ ! -f internal/server/dist/index.html ]; then
|
|
mkdir -p internal/server/dist
|
|
printf '<!DOCTYPE html><html><body><h1>UI not built</h1><p>Run: mise run build:all</p></body></html>' > internal/server/dist/index.html
|
|
fi
|
|
mkdir -p bin && go build -o bin/skillshare ./cmd/skillshare
|
|
"""
|
|
|
|
[tasks."build:meta"]
|
|
description = "Build with version metadata"
|
|
run = "./scripts/build.sh"
|
|
|
|
[tasks.run]
|
|
description = "Run skillshare help using the local binary"
|
|
depends = ["build"]
|
|
run = "./bin/skillshare --help"
|
|
|
|
[tasks.test]
|
|
description = "Run unit and integration tests"
|
|
run = "./scripts/test.sh"
|
|
|
|
[tasks."test:unit"]
|
|
description = "Run unit tests only"
|
|
run = "./scripts/test.sh --unit"
|
|
|
|
[tasks."test:int"]
|
|
description = "Run integration tests only"
|
|
run = "./scripts/test.sh --int"
|
|
|
|
[tasks."test:cover"]
|
|
description = "Run tests with coverage"
|
|
run = "./scripts/test.sh --cover"
|
|
|
|
[tasks."test:install"]
|
|
description = "Run install.sh sandbox tests"
|
|
run = "./scripts/test_install.sh"
|
|
|
|
[tasks."test:docker"]
|
|
description = "Run tests in offline docker sandbox"
|
|
run = "./scripts/test_docker.sh"
|
|
|
|
[tasks."test:docker:online"]
|
|
description = "Run optional network-dependent tests in docker sandbox"
|
|
run = "./scripts/test_docker_online.sh"
|
|
|
|
[tasks."sandbox:up"]
|
|
description = "Start persistent docker playground container"
|
|
run = "./scripts/sandbox_playground_up.sh"
|
|
|
|
[tasks."sandbox:bare"]
|
|
description = "Start playground without auto-init (clean slate)"
|
|
run = "./scripts/sandbox_playground_up.sh --bare"
|
|
|
|
[tasks."sandbox:shell"]
|
|
description = "Enter persistent docker playground shell"
|
|
run = "./scripts/sandbox_playground_shell.sh"
|
|
|
|
[tasks."sandbox:down"]
|
|
description = "Stop and remove persistent docker playground container"
|
|
run = "./scripts/sandbox_playground_down.sh"
|
|
|
|
[tasks."sandbox:reset"]
|
|
description = "Stop playground and remove home volume (full reset)"
|
|
run = "./scripts/sandbox_playground_down.sh --volumes"
|
|
|
|
[tasks.lint]
|
|
description = "Run go vet"
|
|
run = "go vet ./..."
|
|
|
|
[tasks.fmt]
|
|
description = "Format Go files"
|
|
run = "gofmt -w ./cmd ./internal ./tests"
|
|
|
|
[tasks."fmt:check"]
|
|
description = "Check Go formatting (no changes)"
|
|
run = "test -z \"$(gofmt -l ./cmd ./internal ./tests)\""
|
|
|
|
[tasks.check]
|
|
description = "Run formatting check, lint, and tests"
|
|
depends = ["fmt:check", "lint", "test"]
|
|
|
|
[tasks.install]
|
|
description = "Install skillshare to GOPATH/bin"
|
|
run = "go install ./cmd/skillshare"
|
|
|
|
[tasks."ui:install"]
|
|
description = "Install frontend dependencies"
|
|
run = "cd ui && pnpm install"
|
|
|
|
[tasks."ui:build"]
|
|
description = "Build frontend and copy to embed directory"
|
|
depends = ["ui:install"]
|
|
run = """
|
|
(cd ui && pnpm run build)
|
|
rm -rf internal/server/dist
|
|
cp -r ui/dist internal/server/dist
|
|
"""
|
|
|
|
[tasks."ui:dev"]
|
|
description = "Go API server + Vite dev server"
|
|
run = """
|
|
trap 'kill 0' EXIT
|
|
go run -tags dev ./cmd/skillshare ui --no-open &
|
|
cd ui && pnpm run dev
|
|
"""
|
|
|
|
[tasks."build:all"]
|
|
description = "Build frontend + Go binary (full build)"
|
|
depends = ["ui:build", "build"]
|
|
|
|
[tasks.clean]
|
|
description = "Clean build artifacts"
|
|
run = "rm -rf bin coverage.out"
|
|
|
|
[tasks.default]
|
|
description = "Show task help"
|
|
depends = ["help"]
|