mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closes #1830
This commit is contained in:
@@ -50,13 +50,19 @@ module.exports = function(Meta) {
|
||||
|
||||
parser.parse(source, function(err, tree) {
|
||||
if (err) {
|
||||
winston.error('[meta/css] Could not minify LESS/CSS: ' + err.stack);
|
||||
winston.error('[meta/css] Could not minify LESS/CSS: ' + err.message);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
var css = tree.toCSS({
|
||||
cleancss: true
|
||||
});
|
||||
} catch (err) {
|
||||
winston.error('[meta/css] Syntax Error: ' + err.message + ' - ' + path.basename(err.filename) + ' on line ' + err.line);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Meta.css.cache = css;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user