|
|
|
@ -154,12 +154,6 @@ module.exports = function(Meta) {
|
|
|
|
|
winston.verbose('[meta/js] ' + target + ' minification complete');
|
|
|
|
|
minifier.kill();
|
|
|
|
|
|
|
|
|
|
function done() {
|
|
|
|
|
if (typeof callback === 'function') {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (process.send && Meta.js.target['nodebb.min.js'] && Meta.js.target['acp.min.js']) {
|
|
|
|
|
process.send({
|
|
|
|
|
action: 'js-propagate',
|
|
|
|
@ -168,10 +162,16 @@ module.exports = function(Meta) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (nconf.get('local-assets') === undefined || nconf.get('local-assets') !== false) {
|
|
|
|
|
return Meta.js.commitToFile(target, done);
|
|
|
|
|
return Meta.js.commitToFile(target, function() {
|
|
|
|
|
if (typeof callback === 'function') {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
emitter.emit('meta:js.compiled');
|
|
|
|
|
return done();
|
|
|
|
|
if (typeof callback === 'function') {
|
|
|
|
|
return callback();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|