forked from zalando/restful-api-guidelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (43 loc) · 964 Bytes
/
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
#
# Makefile
#
# Requires:
# npm
#
NODE_MODULES=node_modules
# tools
#
gitbook=$(NODE_MODULES)/.bin/gitbook
gh_pages=$(NODE_MODULES)/.bin/gh-pages
url=http://zalando.github.io/restful-api-guidelines
all: help
help:
@echo ""
@echo "make setup - install dependencies"
@echo "make init - initialize book"
@echo "make serve - serve book locally: http://localhost:4000"
@echo "make build - update the '_book/' files"
@echo "make publish - update pages served by GitHub: $(url)"
@echo ""
setup: | $(gitbook)
init: | $(gitbook)
$(gitbook) init
serve: | $(gitbook)
$(gitbook) serve
build: | $(gitbook)
$(gitbook) build -v 2.6.7
publish: build | $(gh_pages)
$(gh_pages) -d _book
#---
$(NODE_MODULES)/gitbook-plugin-%/package.json: | $(gitbook)
$(gitbook) install
#---
$(NODE_MODULES)/.bin/%:
npm install
#---
echo:
@echo $aaa
.PHONY: all help setup init serve build publish echo
# Remove output file if task fails
#
.DELETE_ON_ERROR: