-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
63 lines (53 loc) · 1.21 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
BOOK_NAME := emberjs-guide
BOOK_OUTPUT := _book
.PHONY: build
build:
gitbook build . $(BOOK_OUTPUT)
.PHONY: serve
serve:
gitbook serve . $(BOOK_OUTPUT)
.PHONY: epub
epub:
gitbook epub . $(BOOK_NAME).epub
.PHONY: pdf
pdf:
gitbook pdf . $(BOOK_NAME).pdf
.PHONY: mobi
mobi:
gitbook mobi . $(BOOK_NAME).mobi
.PHONY: install
install:
npm install gitbook-cli -g
gitbook install
.PHONY: deploy
deploy:
make build
git checkout -b gh-pages
git rm SUMMARY.md README.md
git rm -rf book source book.json
cp -r _book/* .
rm -rf _book
git rm Makefile
git add .
git commit -m"update"
git push origin gh-pages --force
git checkout master
git branch -D gh-pages
.PHONY: clean
clean:
rm -rf $(BOOK_OUTPUT)
.PHONY: spell
spell:
go get github.com/client9/misspell/cmd/misspell
git ls-files | xargs misspell -error -o stderr
.PHONY: help
help:
@echo "Help for make"
@echo "make - Build the book"
@echo "make build - Build the book"
@echo "make serve - Serving the book on localhost:4000"
@echo "make install - Install gitbook and plugins"
@echo "make epub - Build epub book"
@echo "make pdf - Build pdf book"
@echo "make spell - Check splling"
@echo "make clean - Remove generated files"