chore(repo): add .editorconfig, reconcile .gitignore, add x clean
Repository hygiene pass (issue #39): - Add `.editorconfig` mirroring ludic-fmt: 2-space indent, LF, UTF-8, trim trailing whitespace and final newline by default; 4-space for Python tooling; keep trailing whitespace in Markdown (hard line breaks). - Reconcile `.gitignore`: root-anchor `/build/` and `/out.ppm`, normalise the misleading `**.zip` glob to `*.zip`, and document that the Kenney art is tracked *extracted* while the download/plugin zips are local-only. `.idea` -> `.idea/`. - Add a `bin/x clean` command that removes `build/`, the root `out.ppm`, and stray `bin/*.tmp`, keeping the toolchain binaries so the running `x` survives. No generated artifacts land outside build/ or bin/, both of which are ignored. Closes #39 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
9ae69e64b4
commit
1c9235a948
4 changed files with 49 additions and 4 deletions
|
|
@ -81,3 +81,15 @@ function cmd_app() -> int {
|
|||
print(`done. run: ./{outbin} (from the repo root, so assets/ resolves)`)
|
||||
return 0
|
||||
}
|
||||
|
||||
# Remove every generated artifact and leave the tracked source untouched: the
|
||||
# whole build/ tree (IR, objects, compiled apps), the headless render dropped in
|
||||
# the root (out.ppm), and any stray *.tmp/*.ll left behind by a failed build.
|
||||
# The toolchain binaries in bin/ are kept so the running `x` survives; rebuild
|
||||
# them any time with `x build`.
|
||||
function cmd_clean() -> int {
|
||||
run("rm -rf build")
|
||||
run("rm -f out.ppm bin/*.tmp")
|
||||
print("cleaned: build/, out.ppm, bin/*.tmp (bin/ toolchain kept — `x build` to rebuild)")
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ program X {
|
|||
print(" x app <file.ludic> [--headless] [--save-temps]")
|
||||
print(" compile a Ludic program to a native app in build/")
|
||||
print(" x tools [--install] [--test] build the editor toolchain (ludic-fmt, ludic-lsp)")
|
||||
print(" x clean remove build/, out.ppm and stray artifacts (keeps bin/)")
|
||||
print("")
|
||||
print("test:")
|
||||
print(" x test the full regression suite")
|
||||
|
|
@ -56,6 +57,7 @@ program X {
|
|||
if (cmd == "build-cli") { exit(cmd_build_cli()) }
|
||||
if (cmd == "app") { exit(cmd_app()) }
|
||||
if (cmd == "tools") { exit(cmd_tools()) }
|
||||
if (cmd == "clean") { exit(cmd_clean()) }
|
||||
if (cmd == "test") { exit(cmd_test()) }
|
||||
if (cmd == "selfhost-test") { exit(cmd_selfhost_test()) }
|
||||
if (cmd == "test-tools") { exit(cmd_test_tools()) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue