diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-27 09:59:09 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-27 09:59:09 +0200 |
commit | f4de7748f596a060e9a59df0447315b59d7c47de (patch) | |
tree | 427e37658a3ccf61ed3a5df63bf263b27fe7530e /lib/models | |
parent | 93c26a839bc8102cf8d12a24ff69381db5a5c864 (diff) | |
download | gitbook-f4de7748f596a060e9a59df0447315b59d7c47de.zip gitbook-f4de7748f596a060e9a59df0447315b59d7c47de.tar.gz gitbook-f4de7748f596a060e9a59df0447315b59d7c47de.tar.bz2 |
Complete generator name in plugins API
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/output.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/models/output.js b/lib/models/output.js index 10df67b..c11017e 100644 --- a/lib/models/output.js +++ b/lib/models/output.js @@ -5,6 +5,9 @@ var Book = require('./book'); var Output = Immutable.Record({ book: Book(), + // Name of the generator being used + generator: String(), + // Map of plugins to use (String -> Plugin) plugins: Immutable.OrderedMap(), @@ -25,6 +28,10 @@ Output.prototype.getBook = function() { return this.get('book'); }; +Output.prototype.getGenerator = function() { + return this.get('generator'); +}; + Output.prototype.getPlugins = function() { return this.get('plugins'); }; @@ -46,6 +53,15 @@ Output.prototype.getState = function() { }; /** + Get root folder for output + + @return {String} +*/ +Output.prototype.getRoot = function() { + return this.getOptions().get('root'); +}; + +/** Return logegr for this output (same as book) @return {Logger} |