diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-09-05 12:32:25 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-09-05 12:32:25 +0200 |
commit | b796069adeadd655ad34dc425ff7a05d7a54cd47 (patch) | |
tree | 30edaffa584e7d3db3f4c65f401f4a8f58f4eef9 /packages/gitbook/src/output/index.js | |
parent | 839904a70419aaef1006be820ec092d978236a20 (diff) | |
download | gitbook-b796069adeadd655ad34dc425ff7a05d7a54cd47.zip gitbook-b796069adeadd655ad34dc425ff7a05d7a54cd47.tar.gz gitbook-b796069adeadd655ad34dc425ff7a05d7a54cd47.tar.bz2 |
Move gitbook source code to es6 (linted)
Diffstat (limited to 'packages/gitbook/src/output/index.js')
-rw-r--r-- | packages/gitbook/src/output/index.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/gitbook/src/output/index.js b/packages/gitbook/src/output/index.js new file mode 100644 index 0000000..574b3df --- /dev/null +++ b/packages/gitbook/src/output/index.js @@ -0,0 +1,24 @@ +const Immutable = require('immutable'); + +const generators = Immutable.List([ + require('./json'), + require('./website'), + require('./ebook') +]); + +/** + Return a specific generator by its name + + @param {String} + @return {Generator} +*/ +function getGenerator(name) { + return generators.find(function(generator) { + return generator.name == name; + }); +} + +module.exports = { + generate: require('./generateBook'), + getGenerator +}; |