Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (46 loc) · 2.51 KB
/
Copy pathMakefile
File metadata and controls
61 lines (46 loc) · 2.51 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
55
56
57
58
59
60
61
.DEFAULT_GOAL := help
NPM ?= npm
NODE ?= node
PROJECT ?= starters/default/app
HOST ?= 127.0.0.1
PORT ?= 3000
DEST ?= ../my-links
.PHONY: help setup dev serve validate test test-project lint check verify test-package init doctor tunnel routes audit
help:
@echo "make dev Run PROJECT under the watcher (installs dependencies if needed)"
@echo "make setup Reinstall dependencies from the lockfile"
@echo "make init Create an independent site (DEST=../my-links; its route project is DEST/app)"
@echo "make validate Validate PROJECT with local environment loading"
@echo "make routes / audit Inventory and readiness checks (ARGS=...)"
@echo "make test-project Run PROJECT's HTTP assertions"
@echo "make test Run runtime unit, HTTP and security tests"
@echo "make verify Run lint, type checks, repository checks, build, runtime tests and workspace verification"
@echo "make test-package Test an installed archive and the starter (registry access)"
@echo "make serve Serve a fixed snapshot; no watcher or local dotenv"
@echo "make doctor Show runtime/platform details"
@echo "make tunnel Run dev behind an already-running ngrok tunnel (see docs/TUNNELS.md)"
@echo "Options: PROJECT=../my-links/app PORT=3001 HOST=127.0.0.1 (PROJECT is the route project, default starters/default/app)"
setup:
$(NPM) ci
node_modules/.package-lock.json: package.json package-lock.json
$(NPM) ci
dev: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts dev --project "$(PROJECT)" --host "$(HOST)" --port "$(PORT)"
serve: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts serve --project "$(PROJECT)" --host "$(HOST)" --port "$(PORT)"
validate: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts validate --local --project "$(PROJECT)"
test-project: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts test --project "$(PROJECT)"
init: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts init "$(DEST)"
doctor: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts doctor
test lint check verify: node_modules/.package-lock.json
$(NPM) run $@
test-package: node_modules/.package-lock.json
$(NPM) run test:package
tunnel: node_modules/.package-lock.json
PROJECT="$(PROJECT)" PORT="$(PORT)" URLCODE="$(CURDIR)/packages/core/src/cli.ts" examples/tunnel/dev-with-ngrok.sh
routes audit: node_modules/.package-lock.json
$(NODE) packages/core/src/cli.ts $@ --project "$(PROJECT)" $(ARGS)