Check that readme file is not ignored when parsing

This commit is contained in:
Samy Pessé
2015-01-23 12:11:27 +01:00
parent 19f1d31758
commit ccd2f6ecdc
+1
View File
@@ -228,6 +228,7 @@ Book.prototype.parseReadme = function() {
return that.findFile(that.config.getStructure("readme"))
.then(function(readme) {
if (!readme) throw "No README file";
if (!_.contains(that.files, readme.path)) throw "README file is ignored";
that.readmeFile = readme.path;
return that.template.renderFile(readme.path)