-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
76 lines (72 loc) · 1.76 KB
/
Copy pathTaskfile.yml
File metadata and controls
76 lines (72 loc) · 1.76 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
67
68
69
70
71
72
73
74
75
76
version: "3"
tasks:
build:
desc: Build Next.js with compile mode (default)
cmds:
- task: build:compile
build:compile:
desc: Build Next.js with experimental compile mode
env:
NODE_ENV: production
cmds:
- pnpm run build:compile
build:generate:
desc: Build Next.js with experimental generate mode
env:
NODE_ENV: production
cmds:
- pnpm run build:generate
build:default:
desc: Build Next.js with default mode
env:
NODE_ENV: production
cmds:
- pnpm run build:default
codegen:
desc: Run CMS + frontend generators (Payload + Next + GraphQL types)
cmds:
- pnpm run p:cli generate:types
- pnpm run p:cli generate:importmap
- pnpm run p:gql generate:schema
- pnpm run p:cli generate:db-schema
- pnpm run next:typegen
- pnpm exec graphql-codegen --config codegen.ts
- task: fix
codegen:check:
desc: Run codegen and fail if it changes the working tree
cmds:
- task: codegen
- |
if [ -n "$(git status --porcelain)" ]; then
echo "Codegen changed files:"
git status --short
exit 1
fi
fix:
desc: Auto-fix lint issues
cmds:
- pnpm run fix
migrate:create:
cmds:
- pnpm run p:cli migrate:create --skip-empty
migrate:is-up-to-date:
cmds:
- pnpm run p:cli migrate:create --check
lint:
desc: Lint sources
cmds:
- pnpm run lint
typegen:
desc: Generate Next.js type metadata (needed for build validation)
cmds:
- pnpm run next:typegen
typecheck:
desc: Run TypeScript typecheck
cmds:
- task: typegen
- pnpm run typecheck
validate:
desc: Run lint + typecheck in parallel
deps:
- lint
- typecheck