summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/generate/index.js6
-rw-r--r--lib/generate/template.js1
-rw-r--r--lib/parse/navigation.js2
-rw-r--r--lib/parse/progress.js1
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;