forked from redis/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 1.06 KB
/
Makefile
File metadata and controls
46 lines (36 loc) · 1.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
HUGO_CONTENT=./content
HUGO_DEBUG=--logLevel debug
HUGO_BUILD=--gc
# ndjson implicitly depends on json_transform -> hugo
all: clean deps components ndjson
serve: clean deps components serve_hugo
localserve: clean deps components_local serve_hugo
deps:
@npm install
@pip3 install -r requirements.txt
components:
@python3 build/make.py
components_local:
@python3 build/make.py --stack ./data/components_local/index.json
hugo:
@hugo $(HUGO_DEBUG) $(HUGO_BUILD)
# json_transform requires hugo to have populated public/ with index.json files
json_transform: hugo
@echo "Transforming JSON files for RAG..."
@npx tsx build/transform_json_sections.ts
# ndjson requires json_transform to have processed the JSON files
ndjson: json_transform
@echo "Generating NDJSON feed..."
@python3 build/generate_ndjson.py
@echo "Compressing NDJSON feed..."
@gzip -kf public/docs.ndjson
serve_hugo:
@hugo serve
clean:
@rm -Rf ./public/
@rm -Rf ./resources/
@rm -Rf ./node_modules/
@rm -f ./package-lock.json
@rm -f ./.hugo_build.lock
@rm -Rf ./examples
@rm -Rf ./public/tmp/*