diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-18 14:16:21 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-18 14:16:22 +0200 |
commit | 9acbb223db6079e66bb5943cfcfc5278fd93f9cd (patch) | |
tree | ce5e14812c17e5ff5f43717a462e1ba09bdc713e /lib/config/index.js | |
parent | c59fc687dbf9cf10222e67295c7d9585f600f523 (diff) | |
download | gitbook-9acbb223db6079e66bb5943cfcfc5278fd93f9cd.zip gitbook-9acbb223db6079e66bb5943cfcfc5278fd93f9cd.tar.gz gitbook-9acbb223db6079e66bb5943cfcfc5278fd93f9cd.tar.bz2 |
Add generator and output property as deprecated in config
Diffstat (limited to 'lib/config/index.js')
-rw-r--r-- | lib/config/index.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/config/index.js b/lib/config/index.js index edc048c..a59cbd7 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -3,6 +3,7 @@ var semver = require('semver'); var gitbook = require('../gitbook'); var Promise = require('../utils/promise'); +var error = require('../utils/error'); var validator = require('./validator'); var plugins = require('./plugins'); @@ -90,6 +91,9 @@ Config.prototype.replace = function(options) { return that.book.parent? that.book.parent.root : undefined; } }); + + error.deprecateField(this.options, 'generator', (this.book.output? this.book.output.name : null), '"options.generator" property is deprecated, use "output.name" instead'); + error.deprecateField(this.options, 'output', (this.book.output? this.book.output.root() : null), '"options.output" property is deprecated, use "output.root()" instead'); }; // Return true if book has a configuration file |