Compare commits

...

2 Commits

Author SHA1 Message Date
Samy Pessé 0759c4dd78 Bump version to 2.0.0-alpha.4 2015-02-04 20:49:09 +01:00
Samy Pessé 82a1a151e4 Correctly copy cover for sub books 2015-02-04 20:29:49 +01:00
4 changed files with 9 additions and 2 deletions
+5
View File
@@ -646,6 +646,11 @@ Book.prototype.parentRoot = function() {
return this.root;
};
// Return true if it's a sub-book
Book.prototype.isSubBook = function() {
return !!this.parent;
};
// Resolve a path in book
Book.prototype.resolve = function(p) {
return path.resolve(this.root, p);
+2
View File
@@ -107,6 +107,8 @@ Configuration.prototype.load = function() {
if (that.options.gitbook == "*") {
that.book.log.warn.ln("you should specify a gitbook version to use in your book.json, for example: "+(_.first(pkg.version.split("."))+".x.x"));
}
that.options.gitbook = pkg.version;
});
};
+1 -1
View File
@@ -58,7 +58,7 @@ BaseGenerator.prototype.copyCover = function() {
])
.fail(function() {
// If orignaly from multi-lang, try copy from parent
if (!that.isMultilingual()) return;
if (!that.book.isSubBook()) return;
return Q.all([
fs.copy(path.join(that.book.parentRoot(), "cover.jpg"), path.join(that.options.output, "cover.jpg")),
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gitbook",
"version": "2.0.0-alpha.3",
"version": "2.0.0-alpha.4",
"homepage": "https://www.gitbook.com",
"description": "Library and cmd utility to generate GitBooks",
"main": "lib/index.js",