-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTaskfile.yaml
106 lines (93 loc) · 1.85 KB
/
Taskfile.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: "3"
dotenv:
- .env
tasks:
new:
desc: Scaffold a new post or page
interactive: true
cmds:
- npx esno new.ts
install:
desc: Install dependencies with Yarn
run: once
sources:
- package.json
- yarn.lock
generates:
- node_modules/*
cmds:
- corepack enable
- corepack prepare yarn@stable --activate
- yarn --immutable
format:
desc: Format codebase
deps: [install]
cmds:
- npx prettier --write .
- npx eslint --fix .
lint:
desc: Lint codebase
deps:
- lint-style
- lint-types
lint-style:
desc: Lint codebase for style issues
deps: [install]
cmds:
- npx prettier --check .
- npx eslint .
lint-types:
desc: Lint TypeScript files for incorrect typing
deps: [install]
sources:
- ./**/*.{ts,tsx}
cmds:
- npx tsc --noEmit
test:
desc: Run application test suite
deps:
- lint
cmds:
- task: test-unit
- task: test-e2e
test-unit:
desc: Run unit tests
deps: [install]
sources:
- src/**/*.{ts,tsx}
cmds:
- npx vitest run
test-e2e:
desc: Run end-to-end tests
deps: [install, build]
cmds:
- npx playwright install --with-deps
- npx playwright test {{.CLI_ARGS}}
dev:
desc: Run development server
deps:
- task: dev-gatsby
dev-gatsby:
desc: Serve the Gatsby development site
deps: [install]
cmds:
- yarn clean
- yarn dev
build:
desc: Build the Gatsby production site
deps: [install]
generates:
- public/
- .cache/
env:
GATSBY_CPU_COUNT: logical_cores
NODE_ENV: production
cmds:
- yarn build
serve:
desc: Serve the Gatsby production site
deps: [install]
env:
NODE_ENV: production
cmds:
- yarn serve