Comparing version 0.4.18 to 0.4.19
@@ -29,2 +29,4 @@ /* | ||
} | ||
if(options.includeFilenames) | ||
var shortenFilename = require("./createFilenameShortener")(options.context); | ||
includedModules.sort(function(a, b) { return a.realId - b.realId; }); | ||
@@ -37,3 +39,3 @@ includedModules.forEach(function(module) { | ||
buffer.push("/*** "); | ||
buffer.push(module.filename); | ||
buffer.push(shortenFilename(module.filename || module.dirname)); | ||
buffer.push(" ***/\n\n"); | ||
@@ -40,0 +42,0 @@ } |
@@ -5,2 +5,3 @@ /* | ||
*/ | ||
var path = require("path"); | ||
module.exports = function(module, options, toRealId, toRealChuckId) { | ||
@@ -37,7 +38,12 @@ var result; | ||
var moduleAppends = []; | ||
var shortenFilename = function(f) { return f }; | ||
if(module.dirname) | ||
shortenFilename = require("./createFilenameShortener")(module.dirname); | ||
if(module.filename) | ||
shortenFilename = require("./createFilenameShortener")(path.dirname(module.filename)); | ||
function genReplaceRequire(requireItem) { | ||
if(requireItem.id !== undefined && toRealId(requireItem.id) !== undefined) { | ||
var prefix = ""; | ||
if(requireItem.name) | ||
prefix += "/* " + requireItem.name + " */"; | ||
if(requireItem.name && options.includeFilenames) | ||
prefix += "/* " + shortenFilename(requireItem.name) + " */"; | ||
if(requireItem.expressionRange) { | ||
@@ -44,0 +50,0 @@ replaces.push({ |
{ | ||
"name": "webpack", | ||
"version": "0.4.18", | ||
"version": "0.4.19", | ||
"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
312748
8684