Skip to content

Node.js based forum software built for the modern web

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

psychobunnye5c842d9239a
diff --git a/src/webserver.js b/src/webserver.js
index 01dee2b91c..849be56879 100644
--- a/src/webserver.js
+++ b/src/webserver.js
@@ -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)
]);
});