-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (27 loc) · 851 Bytes
/
Makefile
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
.PHONY: start-server start-client dev lint-server lint-client lint test-server test-client test format-server format-client format build
define run_in_dir
@(cd $(1) && $(2))
endef
start-server:
$(call run_in_dir,backend,npm run dev)
start-client:
$(call run_in_dir,frontend,npm run dev)
dev:
@((make start-server &) & (make start-client &))
lint-server:
$(call run_in_dir,backend,npm run format)
lint-client:
$(call run_in_dir,frontend,npm run format)
lint: lint-server lint-client
test-server:
$(call run_in_dir,backend,npm run test)
test-client:
$(call run_in_dir,frontend,npm run test)
test: test-server test-client
format-server:
$(call run_in_dir,backend,npx eslint . --fix)
format-client:
$(call run_in_dir,frontend,npx eslint . --fix)
format: format-server format-client
build:
$(call run_in_dir,frontend,npm run build)