Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 109 lines (89 sloc) 2.534 kb
b0499ab @Marak First commit of new skeleton. Structure almost complete, still need t…
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 \
de95528 @AvianFlu [fix] Moved API instructions
AvianFlu authored
6 --linkstyle plain \
7 --linkcolor blue \
8 --embedfonts \
9 --footer "c 1" \
10 --no-toc
e87d3c6 @Marak update
Marak authored
11
a201c42 @jfhbrook [refactor] Makefile only pulls the introduction for the ReadMe, for n…
jfhbrook authored
12 #Hoping to autogenerate the ToC.
f57ae54 @jfhbrook Separated title page and introduction
jfhbrook authored
13 MD = pages/title.md \
a201c42 @jfhbrook [refactor] Makefile only pulls the introduction for the ReadMe, for n…
jfhbrook authored
14 chapters/Table_Of_Contents.md \
7bcfb47 @jfhbrook [minor] Some notes to self in the makefile
jfhbrook authored
15 chapters/introduction.md \
16 chapters/hello_world.md \
a1b5798 @jfhbrook Factored out the "tools" chapter into five separate chapters.
jfhbrook authored
17 chapters/platform_features.md \
18 chapters/jitsu.md \
19 chapters/web_admin.md \
20 chapters/json_api.md \
21 chapters/haibu.md \
fe7737b @jfhbrook [doc] Moved "Open Source Projects" further down
jfhbrook authored
22 chapters/open_source_projects.md \
23 chapters/troubleshooting.md \
24 chapters/support.md \
25 appendices/installing_node.md \
26 appendices/package.json.md \
27 appendices/resources.md \
28 appendices/building_the_handbook.md
de95528 @AvianFlu [fix] Moved API instructions
AvianFlu authored
29
fe7737b @jfhbrook [doc] Moved "Open Source Projects" further down
jfhbrook authored
30 README = pages/title.md \
31 chapters/Table_Of_Contents.md \
32 chapters/introduction.md \
33 chapters/hello_world.md \
34 chapters/platform_features.md \
35 chapters/jitsu.md \
36 chapters/web_admin.md \
37 chapters/json_api.md \
38 chapters/haibu.md \
39 chapters/open_source_projects.md \
40 chapters/troubleshooting.md \
41 chapters/support.md \
42 appendices/installing_node.md \
43 appendices/package.json.md \
44 appendices/resources.md \
45 appendices/building_the_handbook.md
34d4b64 @AvianFlu Reorganized table of contents
AvianFlu authored
46
a201c42 @jfhbrook [refactor] Makefile only pulls the introduction for the ReadMe, for n…
jfhbrook authored
47 API = chapters/json_api.md
e87d3c6 @Marak update
Marak authored
48
49 HTML = $(MD:.md=.html)
50
de95528 @AvianFlu [fix] Moved API instructions
AvianFlu authored
51 all: book.html book.pdf book.md ReadMe.md API.md clear
e87d3c6 @Marak update
Marak authored
52
53 regenerate: clean all
54 git commit -a -m 'Regenerated book' && echo done
55
56 book.pdf: $(HTML)
57 @echo "\n... generating $@"
aeb5a3b @AvianFlu [fix] Fixed broken makefile.
AvianFlu authored
58 htmldoc --webpage -f $@ $(PDF_FLAGS) $(HTML)
e87d3c6 @Marak update
Marak authored
59
a49157e @Marak Added book.md to Makefile
Marak authored
60 book.md: $(HTML)
61 @echo "\n... generating $@"
62 cat $(MD) > book.md
de95528 @AvianFlu [fix] Moved API instructions
AvianFlu authored
63
00a10ec @Marak messing with ReadMe.md
Marak authored
64 ReadMe.md: $(HTML)
65 @echo "\n... generating $@"
de95528 @AvianFlu [fix] Moved API instructions
AvianFlu authored
66 cat $(README) > ReadMe.md
67
68 API.md: $(HTML)
69 @echo "\n... generating $@"
70 cat $(API) > API.md
a49157e @Marak Added book.md to Makefile
Marak authored
71
e87d3c6 @Marak update
Marak authored
72 book.html: pages/head.html pages/tail.html $(HTML)
73 @echo "\n... generating $@"
74 @echo $(HTML)
75 cat pages/head.html $(HTML) pages/tail.html > book.html
76
77 %.html: %.md
78 ronn --pipe --fragment $< \
001be3a @AvianFlu Regenerated book
AvianFlu authored
79 | sed -r 's/<h1>([^ ]+) - /<h1>/' \
e87d3c6 @Marak update
Marak authored
80 > $@
81
82 book.mobi:
83 @echo "\n... generating $@"
84 ebook-convert book.html book.mobi --output-profile kindle
85
86 book.epub:
87 @echo "\n... generating $@"
88 ebook-convert book.html book.epub \
b0499ab @Marak First commit of new skeleton. Structure almost complete, still need t…
Marak authored
89 --title "Nodejitsu Handbook" \
e87d3c6 @Marak update
Marak authored
90 --no-default-epub-cover \
6cf3789 @jfhbrook [minor] Added "Joshua Holbrook" to epub authors
jfhbrook authored
91 --authors "Marak Squires, Joshua Holbrook" \
e87d3c6 @Marak update
Marak authored
92 --language en \
93 --cover pages/cover.jpg
94
95 view: book.pdf
96 open book.pdf
97
98 clean:
99 rm -f book.*
100 rm -f chapters/*.html
ec7e6fd @jfhbrook [doc] Added appendices to cleanup.
jfhbrook authored
101 rm -f appendices/*.html
e87d3c6 @Marak update
Marak authored
102
1470fb2 @Marak Updates to docs, updates to makefile
Marak authored
103 clear:
104 rm -f chapters/*.html
ec7e6fd @jfhbrook [doc] Added appendices to cleanup.
jfhbrook authored
105 rm -f appendices/*.html
9fcd972 @Marak updates
Marak authored
106 rm -f pages/index.html
1470fb2 @Marak Updates to docs, updates to makefile
Marak authored
107
f57ae54 @jfhbrook Separated title page and introduction
jfhbrook authored
108 .PHONY: view clean regenerate
Something went wrong with that request. Please try again.