UNPKG

honkit

Version:

HonKit is building beautiful books using Markdown.

20 lines (18 loc) 629 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const immutable_1 = __importDefault(require("immutable")); /** List blocks from a list of plugins @param {OrderedMap<String:Plugin>} @return {Map<String:TemplateBlock>} */ function listBlocks(plugins) { return plugins.reverse().reduce((result, plugin) => { const blocks = plugin.getBlocks(); return result.merge(blocks); }, immutable_1.default.Map()); } exports.default = listBlocks;