diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:46:34 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:46:34 +0100 |
commit | 2ae392436536b4abd9f7edf195eb6b0c0a0985f1 (patch) | |
tree | 9673e6fd3ab161ef956e56b9e89f1b2207895182 /lib/configuration.js | |
parent | d172aaefee8eb733d23a4e92abd79cbc4a43f801 (diff) | |
download | gitbook-2ae392436536b4abd9f7edf195eb6b0c0a0985f1.zip gitbook-2ae392436536b4abd9f7edf195eb6b0c0a0985f1.tar.gz gitbook-2ae392436536b4abd9f7edf195eb6b0c0a0985f1.tar.bz2 |
Fix parsing of langs
Diffstat (limited to 'lib/configuration.js')
-rw-r--r-- | lib/configuration.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index 0b3073f..daf1b3c 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -6,7 +6,8 @@ var fs = require("./utils/fs"); var Configuration = function(book, options) { this.book = book; - this.options = _.extend({}, Configuration.DEFAULT, options || {}); + this.options = _.cloneDeep(Configuration.DEFAULT); + this.options = _.merge(this.options, options || {}); }; // Read and parse the configuration @@ -25,6 +26,9 @@ Configuration.prototype.load = function() { catch(err) { return Q(); } + }) + .then(function() { + that.options.output = that.options.output || path.join(that.book.root, "_book"); }); }; @@ -48,7 +52,7 @@ Configuration.DEFAULT = { // Structure "structure": { - "langs": "README.md", + "langs": "LANGS.md", "readme": "README.md", "glossary": "GLOSSARY.md", "summary": "SUMMARY.md" |