-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
66 lines (56 loc) · 1.69 KB
/
Taskfile.yml
File metadata and controls
66 lines (56 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3'
silent: true
# Astro site: `dir` + `pnpm --dir` keep the package root at `web/` so `.env` (if present)
# loads from this directory. Task does not support `dotenv:` in included Taskfiles.
vars:
PKG_MGR: pnpm
tasks:
default:
desc: List available tasks
dir: "{{.TASKFILE_DIR}}"
cmds:
- task --list
install:
desc: Install dependencies
dir: "{{.TASKFILE_DIR}}"
cmds:
- echo "Installing web dependencies (pnpm)..."
- '{{.PKG_MGR}} --dir "{{.TASKFILE_DIR}}" install'
build:
desc: Build static site
dir: "{{.TASKFILE_DIR}}"
cmds:
- echo "Building web static site (Astro)..."
- '{{.PKG_MGR}} --dir "{{.TASKFILE_DIR}}" run build'
dev:
desc: Run dev server with hot reload
dir: "{{.TASKFILE_DIR}}"
cmds:
- echo "Starting web dev server with hot reload..."
- '{{.PKG_MGR}} --dir "{{.TASKFILE_DIR}}" run dev'
preview:
desc: Serve built site locally
dir: "{{.TASKFILE_DIR}}"
cmds:
- echo "Previewing built web site locally..."
- '{{.PKG_MGR}} --dir "{{.TASKFILE_DIR}}" run preview'
serve:
desc: Serve built site (run build first if needed)
dir: "{{.TASKFILE_DIR}}"
cmds:
- echo "Serving built web site locally..."
- '{{.PKG_MGR}} --dir "{{.TASKFILE_DIR}}" run preview'
clean:
desc: Remove build artifacts (dist) and node_modules
dir: "{{.TASKFILE_DIR}}"
cmds:
- echo "Removing web build artifacts (dist, node_modules)..."
- rm -rf dist
- rm -rf node_modules
clean:all:
desc: Run clean and remove local .env
dir: "{{.TASKFILE_DIR}}"
deps: [clean]
cmds:
- echo "Removing web .env if present..."
- rm -f .env