forked from LottieFiles/lottie-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (34 loc) · 1.7 KB
/
Makefile
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
# Executable names
PIP ?= pip
PYTHON ?= python
MKDOCS ?= PYTHONPATH="$(SOURCE_DIR)/tools" mkdocs
# Paths
SOURCE_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
OUTPUT_DIR ?= $(CURDIR)/site
CANIUSE_DIR ?= $(SOURCE_DIR)/../caniuse/data
.PHONY: all install_dependencies docs docs_serve lottie.schema.json validate validate_links, validate_caniuse
all: docs
lottie.schema.json:$(SOURCE_DIR)/docs/schema/lottie.schema.json
$(SOURCE_DIR)/docs/schema/lottie.schema.json: $(wildcard $(SOURCE_DIR)/docs/schema/**/*.json)
$(SOURCE_DIR)/docs/schema/lottie.schema.json: $(SOURCE_DIR)/tools/schema-merge.py
$(SOURCE_DIR)/tools/schema-merge.py
docs:$(SOURCE_DIR)/docs/schema/lottie.schema.json
docs:$(SOURCE_DIR)/docs/scripts/blockly_generated.js
$(MKDOCS) build -f $(SOURCE_DIR)/mkdocs.yml -d $(OUTPUT_DIR)
$(OUTPUT_DIR)/index.html:$(wildcard $(SOURCE_DIR)/docs/**/*)
$(OUTPUT_DIR)/index.html:$(SOURCE_DIR)/docs/schema/lottie.schema.json
$(OUTPUT_DIR)/index.html:$(SOURCE_DIR)/tools/md_extensions.py
$(OUTPUT_DIR)/index.html:docs
docs_serve:$(SOURCE_DIR)/docs/schema/lottie.schema.json
$(MKDOCS) serve -f $(SOURCE_DIR)/mkdocs.yml
install_dependencies:
$(PIP) install -r $(SOURCE_DIR)/requirements.txt
validate: $(SOURCE_DIR)/docs/schema/lottie.schema.json
$(SOURCE_DIR)/tools/schema-validate.py
validate_links:$(OUTPUT_DIR)/index.html
$(SOURCE_DIR)/tools/schema-validate.py --html $(OUTPUT_DIR)
$(SOURCE_DIR)/docs/scripts/blockly_generated.js: $(SOURCE_DIR)/tools/generate-blockly.py
$(SOURCE_DIR)/docs/scripts/blockly_generated.js: $(SOURCE_DIR)/docs/schema/lottie.schema.json
$(SOURCE_DIR)/tools/generate-blockly.py
validate_caniuse: $(SOURCE_DIR)/docs/schema/lottie.schema.json
$(SOURCE_DIR)/tools/caniuse.py '$(CANIUSE_DIR)'