diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-04 00:00:12 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-04 00:00:12 -0700 |
commit | cb9a0b82ba0478b9a5b37de6f920edff474312e1 (patch) | |
tree | 02c4cc20eb3b615a80832c1199448c9032bb9fac /lib | |
parent | 57ecfe4a548a9e648cd7aea8b7c7ebedd3aea30d (diff) | |
download | gitbook-cb9a0b82ba0478b9a5b37de6f920edff474312e1.zip gitbook-cb9a0b82ba0478b9a5b37de6f920edff474312e1.tar.gz gitbook-cb9a0b82ba0478b9a5b37de6f920edff474312e1.tar.bz2 |
Fix some typos in lib
Diffstat (limited to 'lib')
-rw-r--r-- | lib/generate/index.js | 6 | ||||
-rw-r--r-- | lib/generate/template.js | 1 | ||||
-rw-r--r-- | lib/parse/navigation.js | 2 | ||||
-rw-r--r-- | lib/parse/progress.js | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js index 43f9497..315ceda 100644 --- a/lib/generate/index.js +++ b/lib/generate/index.js @@ -11,7 +11,7 @@ var generate = function(root, output, options) { var files, summary, navigation, tpl; options = _.defaults(options || {}, { - // Book title, keyword, description + // Book title, description title: null, description: "Book generated using GitBook", @@ -19,7 +19,7 @@ var generate = function(root, output, options) { github: null }); - if (!options.github || !options.title) return Q.reject(new Error("Need options.github and optiosn.title")); + if (!options.github || !options.title) return Q.reject(new Error("Need options.github and options.title")); // Clean output folder @@ -39,7 +39,7 @@ var generate = function(root, output, options) { files = _files; if (!_.contains(files, "SUMMARY.md") || !_.contains(files, "README.md")) { - return Q.reject(new Error("Invalid gitbook repository, need SUMMARY.md and README.md")); + return Q.reject(new Error("Invalid gitbook repository: need SUMMARY.md and README.md")); } }) diff --git a/lib/generate/template.js b/lib/generate/template.js index 7e59443..d4e8cae 100644 --- a/lib/generate/template.js +++ b/lib/generate/template.js @@ -13,7 +13,6 @@ swig.setFilter('lines', function(content) { // return a templeter for page var initTemplate = function(options) { var tpl = swig.compileFile(path.resolve(__dirname, '../../templates/page.html')); - var nExercise = 1; options = _.defaults(options || {}, { // Base folder for input diff --git a/lib/parse/navigation.js b/lib/parse/navigation.js index 9ed82b9..145c873 100644 --- a/lib/parse/navigation.js +++ b/lib/parse/navigation.js @@ -6,7 +6,7 @@ function clean(obj) { return obj && _.omit(obj, ['articles', '_path']); } -// Returns a map of +// Returns from a summary a map of /* { "file/path.html": { diff --git a/lib/parse/progress.js b/lib/parse/progress.js index 7259e07..8cf7605 100644 --- a/lib/parse/progress.js +++ b/lib/parse/progress.js @@ -1,5 +1,6 @@ var _ = require("lodash"); +// Returns from a navigation and a current file, a snapshot of current detailed state var calculProgress = function(navigation, current) { var n = _.size(navigation); var percent = 0, prevPercent = 0, currentChapter = null; |