-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (39 loc) · 2.62 KB
/
Makefile
File metadata and controls
51 lines (39 loc) · 2.62 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
# =============================================================================
# PROJECT: @redkubes/otomi-api (Node.js + TypeScript)
# USAGE: make <target> [PM=npm]
# =============================================================================
PM ?= npm
RUN = $(PM) run
# —–– Phony targets —––––––––––––––––––––––––––––––––––––––––––––––––––––––––
.PHONY: help install dev dev\:node watch start \
test test\:pattern lint lint-fix lint-staged \
typecheck build build\:models build\:spec clean \
prepare commit commit-retry \
release release-minor release\:client pre-release\:client \
run-if-changed license-sign
# —–– Help —–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
help: ## Show this help message
@grep -E '^[a-zA-Z0-9_:/-]+:.*?##' Makefile \
| awk 'BEGIN {print "\nUsage:"} {split($$0,a,":"); printf " make %-20s %s\n", a[1], a[2]}' \
| sed 's/## //g'
# —–– Install dependencies –––––––––––––––––––––––––––––––––––––––––––––––––––
install: ## npm ci (clean install)
$(PM) ci
# —–– Development —–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
dev: ## npm run dev (parallel watch & run)
$(RUN) dev
docker: ## npm run dev:docker (dockerized dev)
$(RUN) dev:docker
start: ## npm start (run built app)
$(PM) start
# —–– Testing & linting –––––––––––––––––––––––––––––––––––––––––––––––––––––
test: ## npm run test (build models & run tests)
$(RUN) test
lint: ## npm run lint (typecheck & lint)
$(RUN) lint
# —–– Build –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
build: ## npm run build (clean, build models, compile & copy assets)
$(RUN) build
# —–– Clean up —–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
clean: ## remove dist artifacts
rm -rf dist