set up plugins in build step as well

v1.18.x
Julian Lam 9 years ago
parent b1f23c8c4b
commit 232b387652

@ -279,6 +279,7 @@ function setup() {
function build(targets, callback) {
var db = require('./src/database');
var meta = require('./src/meta');
var plugins = require('./src/plugins');
var valid = ['js', 'css', 'tpl'];
var step = function (target, next) {
winston.info('[build] Build step completed in ' + ((Date.now() - startTime) / 1000) + 's');
@ -297,7 +298,8 @@ function build(targets, callback) {
async.series([
async.apply(db.init),
async.apply(meta.themes.setupPaths)
async.apply(meta.themes.setupPaths),
async.apply(plugins.init, null, null)
], function (err) {
if (err) {
winston.error('[build] Encountered error preparing for build: ' + err.message);

@ -48,9 +48,11 @@ var middleware;
return callback();
}
app = nbbApp;
middleware = nbbMiddleware;
hotswap.prepare(nbbApp);
if (nbbApp) {
app = nbbApp;
middleware = nbbMiddleware;
hotswap.prepare(nbbApp);
}
if (global.env === 'development') {
winston.verbose('[plugins] Initializing plugins system');

Loading…
Cancel
Save