mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
Fix linting error
This commit is contained in:
+3
-1
@@ -1,2 +1,4 @@
|
||||
docs/**/*
|
||||
test/node_modules/**/*
|
||||
_book/**/*
|
||||
node_modules/**/*
|
||||
test/**/*
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"mocha": true,
|
||||
"browser": true,
|
||||
"jest": true,
|
||||
"jasmine": true
|
||||
|
||||
@@ -54,7 +54,7 @@ function deprecateField(book, key, instance, property, value, msg) {
|
||||
|
||||
if (is.fn(value)) store = value();
|
||||
else store = value;
|
||||
}
|
||||
};
|
||||
|
||||
var getter = function(){
|
||||
prepare();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
var fs = require('../utils/fs');
|
||||
var Promise = require('../utils/promise');
|
||||
var PathUtils = require('../utils/path');
|
||||
|
||||
|
||||
@@ -9,11 +9,6 @@ var encodeNavigation = require('./encodeNavigation');
|
||||
@return {Object}
|
||||
*/
|
||||
function encodeProgress(output, page) {
|
||||
var book = output.getBook();
|
||||
var pages = output.getPages();
|
||||
var summary = book.getSummary();
|
||||
var articles = summary.getArticlesAsList();
|
||||
|
||||
var current = page.getPath();
|
||||
var navigation = encodeNavigation(output);
|
||||
navigation = Immutable.Map(navigation);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
var path = require('path');
|
||||
|
||||
var Parse = require('../parse');
|
||||
var Output = require('../output');
|
||||
|
||||
|
||||
+15
-4
@@ -19,7 +19,7 @@ function printBook(book) {
|
||||
var glossaryFile = glossary.getFile();
|
||||
|
||||
if (configFile.exists()) {
|
||||
logger.info.ln('configuration file is', configFile.getPath());
|
||||
logger.info.ln('Configuration file is', configFile.getPath());
|
||||
}
|
||||
|
||||
if (readmeFile.exists()) {
|
||||
@@ -33,10 +33,21 @@ function printBook(book) {
|
||||
if (summaryFile.exists()) {
|
||||
logger.info.ln('Table of Contents file is', summaryFile.getPath());
|
||||
}
|
||||
|
||||
//logger.info.ln('Table of Contents:');
|
||||
}
|
||||
|
||||
function printMultingualBook(book) {
|
||||
var logger = book.getLogger();
|
||||
var languages = book.getLanguages();
|
||||
var books = book.getBooks();
|
||||
|
||||
logger.info.ln(languages.size + ' languages');
|
||||
|
||||
languages.forEach(function(lang) {
|
||||
logger.info.ln('Language:', lang.getTitle());
|
||||
printBook(books.get(lang.getID()));
|
||||
logger.info.ln('');
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'parse [book]',
|
||||
@@ -59,7 +70,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
if (resultBook.isMultilingual()) {
|
||||
|
||||
printMultingualBook(resultBook);
|
||||
} else {
|
||||
printBook(resultBook);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ Config.prototype.getValue = function(keyPath, def) {
|
||||
value = value.toJS();
|
||||
}
|
||||
|
||||
return value
|
||||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,6 +66,6 @@ Languages.createFromList = function(file, langs) {
|
||||
file: file,
|
||||
list: list
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Languages;
|
||||
|
||||
@@ -126,7 +126,7 @@ function processOutput(generator, startOutput) {
|
||||
return output;
|
||||
}
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,5 @@ module.exports = {
|
||||
onFinish: require('./onFinish'),
|
||||
onPage: require('./onPage'),
|
||||
onAsset: require('./onAsset'),
|
||||
onAsset: require('./onAsset'),
|
||||
createTemplateEngine: require('./createTemplateEngine')
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user