Skip to content

Commit

Permalink
增加Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsongjc committed Jun 22, 2017
1 parent 4e185b4 commit 5167dcd
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
BOOK_NAME := kubernetes-handbook
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).pdf

.PHONY: install
install:
npm install gitbook-cli -g
gitbook install

.PHONY: clean
clean:
rm -rf $(BOOK_OUTPUT)

.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 clean - Remove generated files"

0 comments on commit 5167dcd

Please sign in to comment.