-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) Β· 3.06 KB
/
Makefile
File metadata and controls
54 lines (42 loc) Β· 3.06 KB
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
# =============================================================================
# PROJECT: otomi-console (Reactβ+βTypeScript)
# USAGE: make <target> [PM=npm]
# =============================================================================
# βββ Configurable βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
PM ?= npm
RUN = $(PM) run
# βββ Phony targets βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
.PHONY: help install dev docker start start\:chrome test lint lint-fix \
format format-fix build eject prepare commit commit-retry \
lint-staged gen-store spellcheck release release-minor \
typecheck watch-ts run-if-changed lang-server lang-export \
lang-import clean
# βββ Help ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
help: ## Show this help message
@grep -E '^[a-zA-Z0-9_:-]+:.*?##' Makefile \
| awk 'BEGIN {print "\nUsage:"} {split($$0,a,":"); printf " make %-15s %s\n", a[1], a[2]}' \
| sed 's/## //g'
# βββ Install dependencies βββββββββββββββββββββββββββββββββββββββββββββββββββ
install: ## npm ci (clean install)
$(PM) ci
# βββ Development ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
dev: ## npm run dev (parallel start/watch)
$(RUN) dev
docker: ## npm run dev:docker (dockerized dev)
$(RUN) dev:docker
start: ## npm start (CRA dev server)
$(RUN) start
# βββ Testing & linting βββββββββββββββββββββββββββββββββββββββββββββββββββββ
test: ## npm run test (once)
$(RUN) test
lint: ## npm run lint (includes typecheck)
$(RUN) lint
# βββ Build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
build: ## npm run build (production bundle)
$(RUN) build
# βββ Codegen & utils βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
gen-store: ## npm run gen:store (RTK Query codegen)
$(RUN) gen-store
# βββ Clean up ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
clean: ## remove node_modules & build artifacts
rm -rf node_modules build