-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 1.53 KB
/
Copy pathMakefile
File metadata and controls
52 lines (40 loc) · 1.53 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
PYTHON ?= python3
PNPM ?= pnpm
NODE ?= node
DEV_SERVER_ADDRESS ?= 127.0.0.1
SITE_DIR := site
CLEAN_MANIFEST := scripts/clean-manifest.txt
SITE_NODE_MODULES_DIR := $(SITE_DIR)/node_modules
.PHONY: all build rebuild serve preview test install clean distclean help
all: build
build:
$(PYTHON) scripts/build_llms_txt.py
$(PYTHON) scripts/sync_starlight.py
$(PNPM) --dir $(SITE_DIR) exec astro build
$(PYTHON) scripts/postprocess_site.py
rebuild: clean build
serve:
$(PYTHON) scripts/build_llms_txt.py
$(PYTHON) scripts/sync_starlight.py
$(PNPM) --dir $(SITE_DIR) exec astro dev --host $(DEV_SERVER_ADDRESS)
preview: build
$(PNPM) --dir $(SITE_DIR) exec astro preview
test: build
$(NODE) --test $(SITE_DIR)/scripts/built-site.test.mjs
install:
$(PNPM) --dir $(SITE_DIR) install
clean:
$(PYTHON) scripts/clean_generated.py $(CLEAN_MANIFEST)
distclean: clean
rm -rf $(SITE_NODE_MODULES_DIR)
help:
@printf '%s\n' \
'Targets:' \
' make build Regenerate public LLM docs, sync Starlight content, and build site/dist.' \
' make rebuild Clean generated site output, then run make build.' \
' make serve Regenerate public LLM docs, sync Starlight content, and start Astro dev server.' \
' make preview Build, then preview site/dist.' \
' make test Build, then verify site/dist routes, LLM assets, and analytics.' \
' make install Install site dependencies with pnpm.' \
' make clean Remove generated outputs listed in scripts/clean-manifest.txt.' \
' make distclean Run clean and remove site/node_modules.'