-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.common.yml
75 lines (68 loc) · 1.67 KB
/
Taskfile.common.yml
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
version: '3'
tasks:
go:mod:tidy:
summary: Runs `go mod tidy`
internal: true
generates:
- go.sum
sources:
- go.mod
cmds:
- go mod tidy
install:frontend:deps:
summary: Install frontend dependencies
dir: frontend
sources:
- package.json
- package-lock.json
generates:
- node_modules/*
preconditions:
- sh: npm version
msg: "Looks like npm isn't installed. Npm is part of the Node installer: https://nodejs.org/en/download/"
cmds:
- npm install --force
build:frontend:
summary: Build the frontend project
dir: frontend
sources:
- "**/*"
generates:
- dist/*
deps:
- task: install:frontend:deps
- task: generate:bindings
cmds:
- npm run build -q
generate:bindings:
summary: Generates bindings for the frontend
sources:
- "**/*.go"
- go.mod
- go.sum
generates:
- "frontend/bindings/**/*"
cmds:
- wails3 generate bindings -f '{{.BUILD_FLAGS}}' -ts
generate:icons:
summary: Generates Windows `.ico` and Mac `.icns` files from an image
dir: build
sources:
- "appicon.png"
generates:
- "icons.icns"
- "icons.ico"
cmds:
- wails3 generate icons -input appicon.png
dev:frontend:
summary: Runs the frontend in development mode
dir: frontend
deps:
- task: install:frontend:deps
cmds:
- npm run dev -- --port {{.VITE_PORT}} --strictPort
update:build-assets:
summary: Updates the build assets
dir: build
cmds:
- wails3 update build-assets -name "{{.APP_NAME}}" -binaryname "{{.APP_NAME}}" -config config.yml -dir .