diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-06-10 22:04:19 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-06-10 22:04:19 +0200 |
commit | 94a4310c1e4b9ee71def9cbd9efd8a4c491f4444 (patch) | |
tree | 5f221cb283e5f4591a3764112569ee62220e6da2 /lib/plugins/listDepsForBook.js | |
parent | e8ee57be83adf3de2933373e7969c7675bf5372d (diff) | |
download | gitbook-94a4310c1e4b9ee71def9cbd9efd8a4c491f4444.zip gitbook-94a4310c1e4b9ee71def9cbd9efd8a4c491f4444.tar.gz gitbook-94a4310c1e4b9ee71def9cbd9efd8a4c491f4444.tar.bz2 |
Adapt Plugins.loadForBook to use correct order
Diffstat (limited to 'lib/plugins/listDepsForBook.js')
-rw-r--r-- | lib/plugins/listDepsForBook.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/plugins/listDepsForBook.js b/lib/plugins/listDepsForBook.js new file mode 100644 index 0000000..196e3aa --- /dev/null +++ b/lib/plugins/listDepsForBook.js @@ -0,0 +1,18 @@ +var listDependencies = require('./listDependencies'); + +/** + * List all plugin requirements for a book. + * It can be different from the final list of plugins, + * since plugins can have their own dependencies + * + * @param {Book} + * @return {List<PluginDependency>} + */ +function listDepsForBook(book) { + var config = book.getConfig(); + var plugins = config.getPluginDependencies(); + + return listDependencies(plugins); +} + +module.exports = listDepsForBook; |