Justfile and updated README
This commit is contained in:
16
README.md
16
README.md
@@ -1,3 +1,19 @@
|
|||||||
# Tietokonepaja.fi
|
# Tietokonepaja.fi
|
||||||
|
|
||||||
Livonsaaren Tietokonepajan kotisivut vaihteeksi Vuella!
|
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 |
|
||||||
|
|||||||
34
justfile
Normal file
34
justfile
Normal file
@@ -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}}
|
||||||
Reference in New Issue
Block a user