From 000eb3367a0a01223bc656eeca8b39298f618c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veikko=20Lintuj=C3=A4rvi?= Date: Tue, 17 Mar 2026 20:12:01 +0200 Subject: [PATCH] Justfile and updated README --- README.md | 16 ++++++++++++++++ justfile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 justfile diff --git a/README.md b/README.md index 3c53789..1927ae5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ # Tietokonepaja.fi Livonsaaren Tietokonepajan kotisivut vaihteeksi Vuella! + +## Kehitys + +Projekti käyttää [just](https://github.com/casey/just)-komentotulkkia tehtävien ajamiseen. + +| Komento | Kuvaus | +| -------------------------- | ----------------------------------------------------- | +| `just dev` | Käynnistä kehityspalvelin | +| `just build` | Tuotantoversio (type-check + .htaccess) | +| `just preview` | Esikatsele tuotantoversio paikallisesti | +| `just build-only` | Build ilman type-checkingiä | +| `just type-check` | Tarkista tyypit vue-tsc:llä | +| `just lint` | Lint ja automaattinen korjaus | +| `just format` | Muotoile lähdekoodit Prettierillä | +| `just deploy` | Build ja kopioi `dist/` → `/var/www/tietokonepaja-fi` | +| `just deploy /polku/kohde` | Build ja kopioi `dist/` valittuun hakemistoon | diff --git a/justfile b/justfile new file mode 100644 index 0000000..926b064 --- /dev/null +++ b/justfile @@ -0,0 +1,34 @@ +# Default deploy destination +deploy_dir := "/var/www/tietokonepaja-fi" + +# Start development server +dev: + npm run dev + +# Build for production (with type-check and .htaccess copy) +build: + npm run build + +# Preview production build locally +preview: + npm run preview + +# Build without type-checking +build-only *args: + npm run build-only -- {{args}} + +# Type-check with vue-tsc +type-check: + npm run type-check + +# Lint and auto-fix +lint: + npm run lint + +# Format source files with Prettier +format: + npm run format + +# Build and deploy dist to the given directory (default: /var/www/tietokonepaja-fi) +deploy dest=deploy_dir: build + cp -r dist/. {{dest}}