-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (53 loc) · 1.23 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.PHONY: install, dev-app, dev-api, clean, build, test, lint
TMPDIR := $(shell echo $${TMPDIR:-/tmp})
install-%: SHELL := /bin/bash
install-%:
@echo "Installing $* dependencies..."
(cd ./$* && pnpm install);
install: install-app install-api
dev-api: SHELL := /bin/bash
dev-api: install-api
dev-api:
@echo "Running api in development mode..."
@(cd ./api && pnpm dev);
dev-app: SHELL := /bin/bash
dev-app: install-app
dev-app:
@echo "Running app in development mode..."
@rm -rf $(TMPDIR)/embroider/
@(cd ./app && pnpm dev);
dev: SHELL := /bin/bash
dev: install
dev:
@rm -rf $(TMPDIR)/embroider/
@make -j 2 dev-api dev-app
build-%: SHELL := /bin/bash
build-%: install-%
build-%:
@echo "Building $*..."
@(cd ./$* && pnpm build);
build: SHELL := /bin/bash
build: install
build:
@echo "Building app..."
@make -j 2 build-api build-app
test: SHELL := /bin/bash
test: install-app
test:
@echo "Running ember tests..."
@(cd ./app && pnpm test);
test-api: SHELL := /bin/bash
test-api: install-api
test-api:
@echo "Running api tests..."
@(cd ./api && pnpm test);
clean-%: SHELL := /bin/bash
clean-%:
rm -rf ./$*/node_modules
rm -rf ./$*/dist
rm -rf ./$*/tmp
rm -rf ./$*/build
clean:
@echo "Cleaning up..."
@make clean-app
@make clean-api