diff options
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/book.js b/lib/book.js index cbb85c0..c81d255 100644 --- a/lib/book.js +++ b/lib/book.js @@ -196,9 +196,13 @@ Book.prototype.parse = function() { // Parse the readme .then(that.readme.load) .then(function() { - if (that.readme.exists()) return; + if (!that.readme.exists()) { + throw new error.FileNotFoundError({ filename: 'README' }); + } - throw new error.FileNotFoundError({ filename: 'README' }); + // Default configuration to infos extracted from readme + if (!that.config.get('title')) that.config.set('title', that.readme.title); + if (!that.config.get('description')) that.config.set('description', that.readme.description); }) // Parse the summary |