🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

less-middleware

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-middleware - npm Package Compare versions

Comparing version

to
0.1.8

44

lib/middleware.js

@@ -139,25 +139,29 @@ /*!

parser.parse(str, function(err, tree) {
if (err) {
callback(err, css);
return;
}
try {
if (err) {
callback(err, css);
return;
}
var css = tree.toCSS({
compress: (options.compress == 'auto' ? regex.compress.test(cssPath) : options.compress),
yuicompress: options.yuicompress
});
// Store the less import paths
imports[lessPath] = tree.rules
.filter(function(rule) {
return rule.path;
})
.map(function(rule) {
return {
mtime : Date.now(),
path : path.join(path.dirname(lessPath), rule.path)
};
var css = tree.toCSS({
compress: (options.compress == 'auto' ? regex.compress.test(cssPath) : options.compress),
yuicompress: options.yuicompress
});
callback(err, css);
// Store the less import paths
imports[lessPath] = tree.rules
.filter(function(rule) {
return rule.path;
})
.map(function(rule) {
return {
mtime : Date.now(),
path : path.join(path.dirname(lessPath), rule.path)
};
});
callback(err, css);
} catch(parseError) {
callback(parseError, null);
}
});

@@ -164,0 +168,0 @@ };

@@ -5,3 +5,3 @@ {

"description": "LESS.js middleware for connect.",
"version": "0.1.7",
"version": "0.1.8",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",