-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
92 lines (68 loc) · 2.55 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
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
.PHONY: build help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
setup-env: ## setup the environment
cp -n ./packages/demo/.env.local-example ./packages/demo/.env
install: setup-env package.json ## install dependencies
@if [ "$(CI)" != "true" ]; then \
echo "Full install..."; \
yarn; \
fi
@if [ "$(CI)" = "true" ]; then \
echo "Frozen install..."; \
yarn --frozen-lockfile; \
fi
run: ## run the demo
@yarn -s run-demo
run-prod: ## run the demo in prod
@yarn -s run-demo-prod
build-demo: ## compile the demo to static js
@yarn -s build-demo
build-ra-supabase-core:
@echo "Transpiling ra-supabase-core files...";
@cd ./packages/ra-supabase-core && yarn -s build
build-ra-supabase-language-english:
@echo "Transpiling ra-supabase-language-english files...";
@cd ./packages/ra-supabase-language-english && yarn -s build
build-ra-supabase-language-french:
@echo "Transpiling ra-supabase-language-french files...";
@cd ./packages/ra-supabase-language-french && yarn -s build
build-ra-supabase-ui-materialui:
@echo "Transpiling ra-supabase-ui-materialui files...";
@cd ./packages/ra-supabase-ui-materialui && yarn -s build
build-ra-supabase:
@echo "Transpiling ra-supabase files...";
@cd ./packages/ra-supabase && yarn -s build
build: build-ra-supabase-core build-ra-supabase-ui-materialui build-ra-supabase-language-english build-ra-supabase-language-french build-ra-supabase ## compile ES6 files to JS
lint: ## lint the code and check coding conventions
@echo "Running linter..."
@yarn -s lint
prettier: ## prettify the source code using prettier
@echo "Running prettier..."
@yarn -s prettier
test: build test-unit lint ## launch all tests
test-unit: ## launch unit tests
@echo "Running unit tests...";
@yarn -s test-unit;
test-unit-watch: ## launch unit tests and watch for changes
@echo "Running unit tests...";
@yarn -s test-unit --watch;
test-e2e: ## launch e2e tests
@echo "Running e2e tests...";
@yarn -s test-e2e;
test-e2e-local: ## launch e2e tests
@echo "Running e2e tests...";
@yarn -s test-e2e-local;
supabase-start: ## start the supabase server
@echo "Starting supabase server..."
@yarn supabase start
supabase-stop: ## stop the supabase server
@echo "Stopping supabase server..."
@yarn supabase stop
db-migrate: ## migrate the database
@echo "Apply migrations on the database..."
@yarn -s db-migrate
db-seed: ## seed the database
@echo "Seeding the database..."
@yarn -s db-seed
db-setup: db-migrate db-seed ## setup the database