Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

less-loader

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-loader - npm Package Compare versions

Comparing version 0.2.2 to 0.5.0

22

index.js

@@ -14,5 +14,4 @@ /*

this.cacheable && this.cacheable();
var options = this;
var loaderContext = this;
var cb = this.async();
var resolve = cb ? options.resolve : options.resolve.sync;
var errored = false;

@@ -23,10 +22,10 @@ less.Parser.importer = function (file, paths, callback, env) {

if(cb) {
options.resolve(context, moduleName, function(err, filename) {
loaderContext.resolve(context, moduleName, function(err, filename) {
if(err) {
if(!errored)
options.callback(err);
loaderContext.callback(err);
errored = true;
return;
}
options.dependency && options.dependency(filename);
loaderContext.dependency && loaderContext.dependency(filename);
// The default (asynchron)

@@ -48,3 +47,3 @@ fs.readFile(filename, 'utf-8', function(e, data) {

} catch(e) {
options.callback(formatLessError(e, filename));
loaderContext.callback(formatLessError(e, filename));
}

@@ -55,3 +54,3 @@ }

} else {
var filename = options.resolve.sync(context, moduleName);
var filename = loaderContext.resolveSync(context, moduleName);
// Make it synchron

@@ -71,3 +70,3 @@ try {

} catch(e) {
options.callback(formatLessError(e, filename));
loaderContext.callback(formatLessError(e, filename));
}

@@ -80,7 +79,8 @@ }

less.render(input, {
filename: this.filenames[0],
filename: this.resource,
paths: [],
compress: !!this.minimize
}, function(e, result) {
resultcb(e, e ? null : "module.exports =\n\t" + JSON.stringify(result) + ";");
if(e) return resultcs(e);
resultcb(null, result);
});

@@ -94,2 +94,2 @@ }

}
module.exports.seperableIfResolve = true;
module.exports.seperableIfResolve = true;
{
"name": "less-loader",
"version": "0.2.2",
"version": "0.5.0",
"author": "Tobias Koppers @sokra",

@@ -14,4 +14,3 @@ "description": "less loader module for webpack",

}
],
"license": "MIT"
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc