less-loader
Advanced tools
Comparing version 0.7.0 to 0.7.1
18
index.js
@@ -25,3 +25,2 @@ /* | ||
}; | ||
var context = currentFileInfo.currentDirectory.replace(/[\\\/]$/, ""); | ||
var moduleName = urlToRequire(file); | ||
@@ -36,5 +35,3 @@ if(cb) { | ||
} | ||
newFileInfo.filename = filename; | ||
newFileInfo.currentDirectory = path.dirname(filename); | ||
newFileInfo.rootpath = "./" + path.relative(rootContext, newFileInfo.currentDirectory) + "/"; | ||
updateFileInfo(newFileInfo, rootContext, filename); | ||
// The default (asynchron) | ||
@@ -55,5 +52,3 @@ loaderContext.loadModule("-!" + __dirname + "/stringify.loader.js!" + filename, function(err, data) { | ||
loaderContext.dependency && loaderContext.dependency(filename); | ||
newFileInfo.filename = filename; | ||
newFileInfo.currentDirectory = path.dirname(filename); | ||
newFileInfo.rootpath = "./" + path.relative(rootContext, newFileInfo.currentDirectory) + "/"; | ||
updateFileInfo(newFileInfo, rootContext, filename); | ||
// Make it synchron | ||
@@ -89,1 +84,10 @@ try { | ||
} | ||
function updateFileInfo(fileInfo, rootContext, filename) { | ||
fileInfo.filename = filename; | ||
fileInfo.currentDirectory = path.dirname(filename); | ||
fileInfo.rootpath = "./"; | ||
var relativePath = path.relative(rootContext, fileInfo.currentDirectory); | ||
if(relativePath) { | ||
fileInfo.rootpath += relativePath + "/"; | ||
} | ||
} |
{ | ||
"name": "less-loader", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "less loader module for webpack", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93
3960