-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 1.13 KB
/
Makefile
File metadata and controls
40 lines (30 loc) · 1.13 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
.PHONY: dev build lint lint-fix prettier check backstop-reference backstop-test backstop-approve
dev: node_modules
npx astro dev
build: node_modules
npx astro build
lint: node_modules
npx stylelint 'src/**/*.css'
lint-fix: node_modules
npx stylelint 'src/**/*.css' --fix
prettier: node_modules
pnpm prettier --write src/. backstop_data/**/*.js backstop.json
check: prettier lint
node_modules: package.json pnpm-lock.yaml
pnpm install --frozen-lockfile
backstop-reference: node_modules
lsof -t -i TCP:4321 -s TCP:LISTEN | xargs kill 2>/dev/null || true; \
npx astro dev --port 4321 --host & DEV_PID=$$!; \
until curl -sf http://localhost:4321/ > /dev/null; do sleep 1; done; \
npx backstop reference --docker; STATUS=$$?; \
kill $$DEV_PID 2>/dev/null; \
exit $$STATUS
backstop-approve: node_modules
npx backstop approve
backstop-test: node_modules
lsof -t -i TCP:4321 -s TCP:LISTEN | xargs kill 2>/dev/null || true; \
npx astro dev --port 4321 --host & DEV_PID=$$!; \
until curl -sf http://localhost:4321/ > /dev/null; do sleep 1; done; \
npx backstop test --docker; STATUS=$$?; \
kill $$DEV_PID 2>/dev/null; \
exit $$STATUS