log-loader
Advanced tools
Comparing version 0.0.5 to 0.1.1
{ | ||
"name": "log-loader", | ||
"version": "0.0.5", | ||
"version": "0.1.1", | ||
"description": "loader for debugging", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -43,5 +43,5 @@ | ||
function getLoaderNameByPath(pathToIndexJs) { | ||
var loaderDir = path.dirname(pathToIndexJs); | ||
var loaderDir = path.relative('node_modules', pathToIndexJs); | ||
return loaderDir.split(path.sep).pop(); | ||
return loaderDir.split(path.sep).shift(); | ||
} | ||
@@ -57,3 +57,3 @@ | ||
var loaders = loaderContext.loaders; | ||
var nextLoader = loaders[currentTndex + 1] || null; | ||
var nextLoader = loaders[currentTndex - 1] || null; | ||
@@ -75,6 +75,6 @@ if (nextLoader) { | ||
var loaders = loaderContext.loaders; | ||
var prevLoader = loaders[currentTndex - 1] || null; | ||
var prevLoader = loaders[currentTndex + 1] || null; | ||
if (prevLoader) { | ||
return ' -> ' + getLoaderNameByPath(prevLoader.path); | ||
return getLoaderNameByPath(prevLoader.path)+ ' -> '; | ||
} | ||
@@ -81,0 +81,0 @@ |
@@ -59,8 +59,3 @@ # log-loader | ||
// only option params, this = loader context | ||
callback: function (source) {}, | ||
// for example | ||
// callback: function (source) { | ||
// console.log(source); | ||
// return code; | ||
// }, | ||
callback: function (source) { return source; }, | ||
callbackPitch: function (remainingRequest, precedingRequest, data) {} | ||
@@ -67,0 +62,0 @@ } |
Sorry, the diff of this file is not supported yet
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
62915
64