Comparing version 0.4.13 to 0.4.14
@@ -14,4 +14,4 @@ /* | ||
if(err) { | ||
callback("Module \"" + identifier + "\" not found in context \"" + | ||
context + "\"\n " + err); | ||
callback(new Error("Module \"" + identifier + "\" not found in context \"" + | ||
context + "\"\n " + err)); | ||
return; | ||
@@ -39,3 +39,3 @@ } | ||
if(!stat.isDirectory()) { | ||
finalResult("Context \"" + identifier + "\" in not a directory"); | ||
finalResult(new Error("Context \"" + identifier + "\" in not a directory")); | ||
return; | ||
@@ -80,2 +80,8 @@ } | ||
options.alias = {}; | ||
if(!options.postprocess) | ||
options.postprocess = {}; | ||
if(!options.postprocess.normal) | ||
options.postprocess.normal = []; | ||
if(!options.postprocess.context) | ||
options.postprocess.context = []; | ||
var identifiers = identifier.replace(/^!|!$/g, "").replace(/!!/g, "!").split(/!/g); | ||
@@ -100,7 +106,16 @@ var resource = identifiers.pop(); | ||
if(errors.length > 0) { | ||
callback(errors.join("\n")); | ||
callback(new Error(errors.join("\n"))); | ||
return; | ||
} | ||
identifiers.push(resource); | ||
callback(null, identifiers.join("!")); | ||
var intermediateResult = identifiers.join("!"); | ||
var postprocessors = options.postprocess[type].slice(0); | ||
postprocessors.push(function(result) { | ||
callback(null, result); | ||
}); | ||
(function next(err, result) { | ||
if(err) | ||
return callback(new Error("File \"" + intermediateResult + "\" is blocked by postprocessors: " + err)); | ||
postprocessors.shift()(result, next); | ||
})(null, intermediateResult); | ||
} | ||
@@ -107,0 +122,0 @@ } |
{ | ||
"name": "webpack", | ||
"version": "0.4.13", | ||
"version": "0.4.14", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Packs CommonJs Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loading of js, json, jade, coffee, css, ... out of the box and more with custom loaders.", |
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
306645
8513