Shim make dev and make build, format backend/ markdown (closes #28)
check / check (push) Successful in 4m11s
check / check (push) Successful in 4m11s
make dev ran yarn dev inline and there was no make build. Both are now shims, over script/dev and the new script/build. .prettierignore stops leaving out backend/, so backend/README.md is formatted and checked; backend/.golangci.yml is left out by name instead: it is the org standard file whose sha256 backend/script/lint checks, and prettier would reindent it. .claude/ stays in .prettierignore, as git does not ignore it. script/install-precommit and the date on bootstrap's pins go back to the org model; bootstrap, fmt and fmt-check keep what the Go backend and eslint need, each with a comment saying so. Model: opus-5-5
This commit was merged in pull request #101.
This commit is contained in:
+3
-1
@@ -17,11 +17,13 @@
|
||||
#
|
||||
# golangci-lint is not installed: make lint runs it in Docker, which
|
||||
# this script does not install either.
|
||||
#
|
||||
# Unlike the org model: Go and gcc for backend/, a newer node for eslint.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
# Pinned versions, 2026-07-07
|
||||
# Pinned versions, 2026-07-06
|
||||
NODE_VERSION="22.17.0"
|
||||
# The oldest node the frontend's dependencies accept: the "engines"
|
||||
# field of eslint 10.12.0, the most demanding of them, asks for 22.13.0
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# script/build: build the frontend for production into dist/. The Go
|
||||
# backend is built by backend/script/build.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
yarn build
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# script/dev: run the frontend's Vite dev server. It proxies /api to a
|
||||
# netwatch-server running locally (see vite.config.js).
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
yarn dev
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
# script/fmt: format the whole repo (writes): prettier over everything
|
||||
# it understands, then gofmt over the Go backend.
|
||||
# The org model formats only markdown; this repo also has JS and Go.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
# script/fmt-check: check formatting across the whole repo (read-only).
|
||||
# Same scope as script/fmt, but fails instead of writing.
|
||||
# The org model checks only markdown; this repo also has JS and Go.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# script/frontend-fmt: format the frontend and every other file prettier
|
||||
# understands, repo-wide (writes). backend/ is in .prettierignore; Go
|
||||
# sources are formatted by backend/script/fmt.
|
||||
# understands, repo-wide (writes), the markdown in backend/ included.
|
||||
# Prettier does not read Go; backend/script/fmt formats the Go sources.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
@@ -8,8 +8,8 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
hook=".git/hooks/pre-commit"
|
||||
printf '#!/bin/sh\nset -e\nscript/precommit\n' > "$hook"
|
||||
chmod +x "$hook"
|
||||
printf '#!/bin/sh\nset -e\nscript/precommit\n' > .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
echo "pre-commit hook installed: runs script/precommit"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user