UNPKG

astroboy

Version:

Astroboy(阿童木)is a Nodejs SFB(Separation of Front and Back ends) framework, built on koa2.

17 lines 572 B
"use strict"; const assert = require("assert"); const lodash = require("lodash"); const Loader_1 = require("../core/Loader"); class AstroboyBootLoader extends Loader_1.Loader { load() { this.globDirs(this.config.pattern || [], entries => { entries.forEach(entry => { const boot = require(entry); assert(lodash.isFunction(boot), `${entry} must return a function.`); boot(this.app); }); }); } } module.exports = AstroboyBootLoader; //# sourceMappingURL=AstroboyBootLoader.js.map