Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 67 lines (53 sloc) 1.525 kb
b0499ab @Marak First commit of new skeleton. Structure almost complete, still need to f...
Marak authored
1 # Makefile originally from the 'Mastering Node' book written TJ Holowaychuk
2 # https://github.com/visionmedia/masteringnode
3 #
4
e87d3c6 @Marak update
Marak authored
5 PDF_FLAGS = --fontsize 9.0 \
6 --linkstyle plain \
b0499ab @Marak First commit of new skeleton. Structure almost complete, still need to f...
Marak authored
7 --linkcolor blue \
e87d3c6 @Marak update
Marak authored
8 --embedfonts \
9 --footer "c 1" \
10 --no-toc
11
12 MD = pages/index.md \
13 chapters/Table_Of_Contents.md \
14 chapters/Deploying_Applications.md \
15 chapters/Setting_Up_Databases.md \
16 chapters/Using_The_Jitsu_Client.md \
17 chapters/Using_The_API.md \
18 chapters/The_Marketplace.md \
19 chapters/Add_Ons.md \
20 chapters/Open_Source_Projects.md
21
22 HTML = $(MD:.md=.html)
23
1470fb2 @Marak Updates to docs, updates to makefile
Marak authored
24 all: book.html book.pdf clear
e87d3c6 @Marak update
Marak authored
25
26 regenerate: clean all
27 git commit -a -m 'Regenerated book' && echo done
28
29 book.pdf: $(HTML)
30 @echo "\n... generating $@"
31 htmldoc $(HTML) $(PDF_FLAGS) --outfile $@
32
33 book.html: pages/head.html pages/tail.html $(HTML)
34 @echo "\n... generating $@"
35 @echo $(HTML)
36 cat pages/head.html $(HTML) pages/tail.html > book.html
37
38 %.html: %.md
39 ronn --pipe --fragment $< \
40 | sed -E 's/<h1>([^ ]+) - /<h1>/' \
41 > $@
42
43 book.mobi:
44 @echo "\n... generating $@"
45 ebook-convert book.html book.mobi --output-profile kindle
46
47 book.epub:
48 @echo "\n... generating $@"
49 ebook-convert book.html book.epub \
b0499ab @Marak First commit of new skeleton. Structure almost complete, still need to f...
Marak authored
50 --title "Nodejitsu Handbook" \
e87d3c6 @Marak update
Marak authored
51 --no-default-epub-cover \
b0499ab @Marak First commit of new skeleton. Structure almost complete, still need to f...
Marak authored
52 --authors "Marak Squires" \
e87d3c6 @Marak update
Marak authored
53 --language en \
54 --cover pages/cover.jpg
55
56 view: book.pdf
57 open book.pdf
58
59 clean:
60 rm -f book.*
61 rm -f chapters/*.html
62
1470fb2 @Marak Updates to docs, updates to makefile
Marak authored
63 clear:
64 rm -f chapters/*.html
9fcd972 @Marak updates
Marak authored
65 rm -f pages/index.html
1470fb2 @Marak Updates to docs, updates to makefile
Marak authored
66
e87d3c6 @Marak update
Marak authored
67 .PHONY: view clean regenerate
Something went wrong with that request. Please try again.