mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +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');
|
var port = nconf.get('port');
|
||||||
|
|
||||||
module.exports.init = function() {
|
module.exports.init = function() {
|
||||||
|
var skipJS, skipLess, fromFile = nconf.get('from-file') || '';
|
||||||
|
|
||||||
emailer.registerApp(app);
|
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
|
// Preparation dependent on plugins
|
||||||
plugins.ready(function() {
|
plugins.ready(function() {
|
||||||
async.parallel([
|
async.parallel([
|
||||||
async.apply(!nconf.get('from-file') ? meta.js.minify : meta.js.getFromFile, app.enabled('minification')),
|
async.apply(!skipJS ? meta.js.minify : meta.js.getFromFile, app.enabled('minification')),
|
||||||
async.apply(!nconf.get('from-file') ? meta.css.minify : meta.css.getFromFile),
|
async.apply(!skipLess ? meta.css.minify : meta.css.getFromFile),
|
||||||
async.apply(meta.sounds.init)
|
async.apply(meta.sounds.init)
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user