devsite/node_modules/@11ty/eleventy/src/EventBus.js
2024-07-07 18:49:38 -07:00

18 lines
489 B
JavaScript

const EventEmitter = require("./Util/AsyncEventEmitter");
const debug = require("debug")("Eleventy:EventBus");
/**
* @module 11ty/eleventy/EventBus
*/
debug("Setting up global EventBus.");
/**
* Provides a global event bus that modules deep down in the stack can
* subscribe to from a global singleton for decoupled pub/sub.
* @type * {module:11ty/eleventy/Util/AsyncEventEmitter~AsyncEventEmitter}
*/
let bus = new EventEmitter();
bus.setMaxListeners(100);
module.exports = bus;