ability to send in extensions (comma delimited) to --from-file

v1.18.x
psychobunny 10 years ago
parent eb6754c5eb
commit e5c842d923

@ -34,13 +34,25 @@ if(nconf.get('ssl')) {
var port = nconf.get('port');
module.exports.init = function() {
var skipJS, skipLess, fromFile = nconf.get('from-file') || '';
emailer.registerApp(app);
if (fromFile.match('js')) {
winston.info('[minifier] Minifying client-side JS skipped');
skipJS = true;
}
if (fromFile.match('less')) {
winston.info('[minifier] Compiling LESS files skipped');
skipLess = true;
}
// Preparation dependent on plugins
plugins.ready(function() {
async.parallel([
async.apply(!nconf.get('from-file') ? meta.js.minify : meta.js.getFromFile, app.enabled('minification')),
async.apply(!nconf.get('from-file') ? meta.css.minify : meta.css.getFromFile),
async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, app.enabled('minification')),
async.apply(!skipLess ? meta.css.minify : meta.css.getFromFile),
async.apply(meta.sounds.init)
]);
});

Loading…
Cancel
Save