mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
ability to send in extensions (comma delimited) to --from-file
This commit is contained in:
@@ -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)
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user