forked from contao/docs-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (55 loc) · 2.46 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
help:
@echo ""
@echo "Recommended commands:"
@echo " make view-manual Builds the user manual and starts a local webserver"
@echo " make view-cookbook Builds the cookbook and starts a local webserver"
@echo " make view-api Builds the API documentation and starts a local webserver"
@echo " make view-contao4 Builds the Contao 4 migration book and starts a local webserver"
@echo " make view-manager Builds the Contao Manager book and starts a local webserver"
@echo ""
@echo "Other commands:"
@echo " make build Builds HTML version of all books"
@echo " make build-pdf Builds PDFs for the user manual"
@echo " make install Installs latest GitBook and dependencies"
@echo ""
view-manual: install
@node_modules/.bin/gitbook serve ./manual
view-cookbook: install
@node_modules/.bin/gitbook serve ./cookbook
view-api: install
@node_modules/.bin/gitbook serve ./api
view-contao4:
@node_modules/.bin/gitbook serve ./extending-contao4
view-manager:
@node_modules/.bin/gitbook serve ./manager
build: install
@node_modules/.bin/gitbook build ./manual
@node_modules/.bin/gitbook build ./cookbook
@node_modules/.bin/gitbook build ./api
@node_modules/.bin/gitbook build ./extending-contao4
@node_modules/.bin/gitbook build ./manager
build-pdf: install install-python
@npm install ebook-convert
@node_modules/.bin/gitbook pdf ./manual ./manual.pdf
install:
@echo "--> Installing GitBook and plugins..."
@npm install gitbook-cli
@node_modules/.bin/gitbook install ./manual
@node_modules/.bin/gitbook install ./cookbook
@node_modules/.bin/gitbook install ./api
@node_modules/.bin/gitbook install ./extending-contao4
@node_modules/.bin/gitbook install ./manager
@rm -rf manual/node_modules/gitbook-plugin-anchorjs
@rm -rf cookbook/node_modules/gitbook-plugin-anchorjs
@rm -rf api/node_modules/gitbook-plugin-anchorjs
@rm -rf extending-contao4/node_modules/gitbook-plugin-anchorjs
@rm -rf manager/node_modules/gitbook-plugin-anchorjs
@cd manual/; npm install "https://github.com/aschempp/gitbook-plugin-anchorjs.git"
@cd cookbook/; npm install "https://github.com/aschempp/gitbook-plugin-anchorjs.git"
@cd api/; npm install "https://github.com/aschempp/gitbook-plugin-anchorjs.git"
@cd extending-contao4/; npm install "https://github.com/aschempp/gitbook-plugin-anchorjs.git"
@cd manager/; npm install "https://github.com/aschempp/gitbook-plugin-anchorjs.git"
install-python:
@echo "--> You must have Python virtualenv"
@virtualenv python_modules
deploy: build build-pdf