Skip to content

Commit

Permalink
Update build process & intro chaptes
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani committed Nov 30, 2024
1 parent 0f96763 commit b62add5
Show file tree
Hide file tree
Showing 9 changed files with 13,843 additions and 9,270 deletions.
30 changes: 29 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# Dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
yarn.lock

# Build outputs
*.epub
*.mobi
*.pdf
*.rtf
backbone-fundamentals.md

# OS files
.DS_Store
*.log
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Editor directories and files
.idea
.vscode
*.swp
*.swo
*~
22 changes: 7 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,35 @@ markdown:
awk 'FNR==1{print ""}{print}' $(source) > $(filename).md

html: markdown
pandoc -s $(filename).md -t html5 -o index.html -c style.css \
pandoc -s $(filename).md -f markdown+smart -t html5 -o index.html -c style.css \
--include-in-header $(include_dir)/head.html \
--include-before-body $(include_dir)/author.html \
--include-before-body $(include_dir)/share.html \
--include-after-body $(include_dir)/stats.html \
--title-prefix $(title) \
--normalize \
--smart \
--toc

epub: markdown
pandoc -s $(filename).md --normalize --smart -t epub -o $(filename).epub \
pandoc -s $(filename).md -f markdown+smart -t epub -o $(filename).epub \
--epub-metadata $(include_dir)/metadata.xml \
--epub-stylesheet epub.css \
--css epub.css \
--epub-cover-image img/cover.jpg \
--title-prefix $(title) \
--normalize \
--smart \
--toc

rtf: markdown
pandoc -s $(filename).md -o $(filename).rtf \
--title-prefix $(title) \
--normalize \
--smart
pandoc -s $(filename).md -f markdown+smart -o $(filename).rtf \
--title-prefix $(title)

pdf: markdown
# You need `pdflatex`
# OS X: http://www.tug.org/mactex/
# Then find its path: find /usr/ -name "pdflatex"
# Then symlink it: ln -s /path/to/pdflatex /usr/local/bin
pandoc -s $(filename).md -o $(filename).pdf \
pandoc -s $(filename).md -f markdown+smart -o $(filename).pdf \
--title-prefix $(title) \
--normalize \
--smart \
--toc \
--latex-engine=`which xelatex`
--pdf-engine=xelatex

mobi: epub
# Download: http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211
Expand Down
Binary file modified backbone-fundamentals.epub
Binary file not shown.
802 changes: 350 additions & 452 deletions backbone-fundamentals.md

Large diffs are not rendered by default.

Binary file modified backbone-fundamentals.pdf
Binary file not shown.
150 changes: 82 additions & 68 deletions chapters/01-introduction.md

Large diffs are not rendered by default.

538 changes: 210 additions & 328 deletions chapters/02-fundamentals.md

Large diffs are not rendered by default.

21,558 changes: 13,153 additions & 8,405 deletions index.html

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,16 @@
"bugs": {
"url": "https://github.com/addyosmani/backbone-fundamentals/issues"
},
"homepage": "https://github.com/addyosmani/backbone-fundamentals"
"homepage": "https://github.com/addyosmani/backbone-fundamentals",
"dependencies": {
"backbone": "^1.5.0",
"jquery": "^3.7.1",
"underscore": "^1.13.6"
},
"devDependencies": {
"pandoc": "^0.2.0"
},
"scripts": {
"build": "make all"
}
}

0 comments on commit b62add5

Please sign in to comment.