Skip to content

Commit

Permalink
Initial commit. Skeleton ebook.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Gurnell committed Aug 26, 2016
0 parents commit a1eb2f8
Show file tree
Hide file tree
Showing 23 changed files with 5,615 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
_site/*
_theme_packages/*

Thumbs.db
.DS_Store

!.gitkeep

.rbenv-version
.rvmrc
/bower_components/
/dist/
/node_modules/

*.sublime-workspace

target/
project/target
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "jekyll"
gem "kramdown"
gem "typogruby"
75 changes: 75 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
GEM
remote: https://rubygems.org/
specs:
blankslate (2.1.2.4)
celluloid (0.16.0)
timers (~> 4.0.0)
classifier-reborn (2.0.1)
fast-stemmer (~> 1.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
colorator (0.1)
execjs (2.2.2)
fast-stemmer (1.0.2)
ffi (1.9.6)
hitimes (1.2.2)
jekyll (2.4.0)
classifier-reborn (~> 2.0)
colorator (~> 0.1)
jekyll-coffeescript (~> 1.0)
jekyll-gist (~> 1.0)
jekyll-paginate (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 2.6.1)
mercenary (~> 0.3.3)
pygments.rb (~> 0.6.0)
redcarpet (~> 3.1)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-gist (1.1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.2.1)
sass (~> 3.2)
jekyll-watch (1.1.1)
listen (~> 2.7)
kramdown (1.4.2)
liquid (2.6.1)
listen (2.7.11)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.4)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.9)
pygments.rb (0.6.0)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
redcarpet (3.2.0)
rubypants (0.2.0)
safe_yaml (1.0.4)
sass (3.4.6)
timers (4.0.1)
hitimes
toml (0.1.2)
parslet (~> 1.5.0)
typogruby (1.0.17)
rubypants
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
jekyll
kramdown
typogruby
9 changes: 9 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#global module:false

"use strict"

ebook = require 'underscore-ebook-template'

module.exports = (grunt) ->
ebook(grunt, { dir: { page: "target/pages" } })
return
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# The Type Astronaut's Guide to Shapeless (Working Title)

Content for my Scala World 2016 workshop on [shapeless][shapeless].
This is a very early release of this material.
The title, repo location, and build system are likely to change.

Copyright 2016 Dave Gurnell. Licensed [CC-BY-SA 3.0][license].

## Getting Started

Install Docker and use `go.sh` to boot an instance
with all the right dependencies:

~~~
bash$ ./go.sh
~~~

Then use `sbt` to build the book:

~~~
sbt pdf
sbt html
sbt epub
~~~

[license]: https://creativecommons.org/licenses/by-sa/3.0/
[shapeless]: https://github.com/milessabin/shapeless
34 changes: 34 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
lazy val root = project.in(file("."))
.settings(tutSettings)

tutSourceDirectory := sourceDirectory.value / "pages"

tutTargetDirectory := target.value / "pages"

scalaVersion := "2.11.8"

scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-unchecked",
"-feature",
"-Ywarn-dead-code",
"-Xlint",
"-Xfatal-warnings"
)

resolvers ++= Seq(Resolver.sonatypeRepo("snapshots"))

libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.2"
)

lazy val pdf = taskKey[Unit]("Build the PDF version of the book")
lazy val html = taskKey[Unit]("Build the HTML version of the book")
lazy val epub = taskKey[Unit]("Build the ePub version of the book")
lazy val all = taskKey[Unit]("Build all versions of the book")

pdf := { tut.value ; "grunt pdf" ! }
html := { tut.value ; "grunt html" ! }
epub := { tut.value ; "grunt epub" ! }
all := { pdf ; html ; epub }
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '2'
services:
book:
image: underscoreio/book:latest
volumes:
- .:/source
2 changes: 2 additions & 0 deletions go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
docker-compose run book bash
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "shapeless-guide",
"description": "",
"version": "0.0.1",
"devDependencies": {
"underscore-ebook-template": "git+https://github.com/underscoreio/underscore-ebook-template.git#0.1.0"
},
"scripts": {
"test": "echo \"Error: no test specificed\" && exit 1"
},
"author": "Dave Gurnell"
}
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.1")
5 changes: 5 additions & 0 deletions sbt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

export JAVA_OPTS="-Xmx3g -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -XX:+UseNUMA -XX:+UseParallelGC -XX:+CMSClassUnloadingEnabled"

sbt "$@"
4,811 changes: 4,811 additions & 0 deletions src/covers/epub-cover.ai

Large diffs are not rendered by default.

Binary file added src/covers/epub-cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/css/book.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@book-color: #ffffff;
2 changes: 2 additions & 0 deletions src/meta/epub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
...
2 changes: 2 additions & 0 deletions src/meta/html.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
...
22 changes: 22 additions & 0 deletions src/meta/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# Used by Pandoc to print covers:
title: "The Type Astronaut's Guide to Shapeless"
author: "Dave Gurnell"
date: "August 2016"
# Used by Pandoc to generate the PDF cover...
# see src/css/book.css for HTML/ePub covers:
coverColor: "25AAE1"
# Used by Grunt to name output files:
filenameStem: "shapeless-guide"
# Used by Grunt to create a ZIP of source code:
exercisesRepo: null
tocDepth: 3
copyright: "2016"
# Used by Grunt to assemble pandoc command line:
pages:
- intro/index.md
- notes/outline.md
- notes/libraries.md
- solutions.md
- links.md
...
4 changes: 4 additions & 0 deletions src/meta/pdf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
papersize: "a4paper"
geometry: "margin=.75in"
...
8 changes: 8 additions & 0 deletions src/pages/intro/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

This ebook contains content for
my Scala World 2016 workshop on [shapeless][link-shapeless].

This is a very early release of this material:
it's mostly incomplete, full of notes,
and the title, repo location, and build system are likely to change.
1 change: 1 addition & 0 deletions src/pages/links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[link-shapeless]: https://github.com/milessabin/shapeless
Loading

0 comments on commit a1eb2f8

Please sign in to comment.