From 051de54ca6ba726647af6b43a64ed17355524f67 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Tue, 28 Jul 2026 18:37:14 +0200 Subject: [PATCH] Add example VS Code tasks and README Co-Authored-By: Claude Fable 5 --- README.md | 32 ++++++++++++++++++++++++++++++++ example-tasks.json | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 README.md create mode 100644 example-tasks.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..6b13c0b --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# tic80-tools + +CI/CD templates for [TIC-80](https://tic80.com) (Lua) game projects. + +- `example-makefile.make` — project Makefile: local dev targets + (`build`, `minify`, `watch`, `lint`, `docs`, `import_assets`, + `export_assets`, `clean`, `install_precommit_hook`) plus the + Woodpecker pipeline targets (`ci-version`, `ci-lint`, `ci-minify`, + `ci-docs`, `ci-export`, `ci-artifact`, `ci-update`). +- `example-woodpecker.yaml` — Woodpecker pipeline: version → lint → + minify → docs → export (TIC-80 Pro image) → artifact (scp to the + droparea) → update (calls the teletypegames `/update` endpoint with + `platform=tic80`). +- `example-tasks.json` — VS Code `.vscode/tasks.json` with the common + dev tasks: **Run TIC80** (default build task, `Cmd+Shift+B`), + **Build & Run TIC80**, **Export assets** and **Make build**. + +## Usage in a game repo + +1. Copy `example-makefile.make` to `Makefile` and set `PROJECT` + (the cartridge is built as `$(PROJECT).lua` from the file list in + `$(PROJECT).inc`). +2. Copy `example-woodpecker.yaml` to `.woodpecker.yaml` and add the + `droparea_ssh_password` / `update_secret_key` secrets in Woodpecker. +3. Copy `example-tasks.json` to `.vscode/tasks.json` and replace the + cart name (`impostor.lua`) with `$(PROJECT).lua`. + +The pipeline uploads `$(PROJECT)-$(VERSION).lua`, `.tic`, `.html.zip` +and `-docs.zip` to the droparea, then triggers +`/update?platform=tic80&name=$(PROJECT)&version=$(VERSION)`. + +Detailed documentation lives on the wiki: `/development/tic80`. diff --git a/example-tasks.json b/example-tasks.json new file mode 100644 index 0000000..7d85b1a --- /dev/null +++ b/example-tasks.json @@ -0,0 +1,35 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + // Copy to .vscode/tasks.json and replace "impostor" with your PROJECT name. + "version": "2.0.0", + "tasks": [ + { + "label": "Run TIC80", + "type": "shell", + "command": "tic80 --fs=. impostor.lua", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build & Run TIC80", + "type": "shell", + "command": "make clean && make build && tic80 --fs=. impostor.lua", + "problemMatcher": [] + }, + { + "label": "Export assets", + "type": "shell", + "command": "make export_assets", + "problemMatcher": [] + }, + { + "label": "Make build", + "type": "shell", + "command": "make build" + } + ] +}