-
Notifications
You must be signed in to change notification settings - Fork 4
/
Taskfile.yml
96 lines (80 loc) · 2.16 KB
/
Taskfile.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3"
tasks:
# -------------------------------------------------
# ----------------- GENERAL TASKS -----------------
# -------------------------------------------------
dev:
cmds:
- defer: npx kill-port 8080
- |
concurrently \
-n "functions, firebase, client" \
"task build_functions_watch" \
"task emulate_firebase" \
"task emulate_client" \
--kill-others-on-fail \
--prefix-length 9 \
--max-processes 3 \
--success first \
--prefix-colors red.bold,yellow.bold,blue.bold \
--prefix "[{time} - {name}]" \
--timestamp-format HH:mm:ss
install:
deps:
- install_client
- install_functions
deploy:
deps:
- deploy_functions
- deploy_client
# ------------------------------------------------
# ----------------- CLIENT TASKS -----------------
# ------------------------------------------------
install_client:
cmds:
- cd client && npm install
emulate_client:
cmds:
- npm run start --prefix client
build_client:
cmds:
- npm run build --prefix client
sources:
- client/src/**/*
generates:
- client/build/**/*
method: timestamp
deploy_client:
deps:
- build_client
cmds:
- firebase deploy --only hosting
# --------------------------------------------------
# ----------------- FIREBASE TASKS -----------------
# --------------------------------------------------
emulate_firebase:
deps: [build_functions]
cmds:
- firebase emulators:start
# ---------------------------------------------------
# ----------------- FUNCTIONS TASKS -----------------
# ---------------------------------------------------
install_functions:
cmds:
- cd functions && npm install
build_functions_watch:
cmds:
- npm run build:watch --prefix functions
build_functions:
cmds:
- npm run build --prefix functions
sources:
- functions/src/**/*
generates:
- functions/lib/**/*
method: timestamp
deploy_functions:
deps:
- build_functions
cmds:
- firebase deploy --only functions