browserify-header
Advanced tools
Comparing version 0.9.1 to 0.9.2
16
index.js
@@ -54,6 +54,6 @@ /* | ||
/* hook into the bundle generation pipeline of Browserify */ | ||
browserify.on("bundle", function (pipeline) { | ||
/* create a transform stream */ | ||
var createStream = function () { | ||
var firstChunk = true; | ||
pipeline.get("wrap").push(through.obj(function (buf, enc, next) { | ||
var stream = through.obj(function (buf, enc, next) { | ||
if (firstChunk) { | ||
@@ -66,5 +66,13 @@ /* insert the header comment as the first chunk */ | ||
next(); | ||
})); | ||
}); | ||
stream.label = "header"; | ||
return stream; | ||
}; | ||
/* hook into the bundle generation pipeline of Browserify */ | ||
browserify.pipeline.get("wrap").push(createStream()); | ||
browserify.on("reset", function () { | ||
browserify.pipeline.get("wrap").push(createStream()); | ||
}); | ||
}; | ||
{ | ||
"name": "browserify-header", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Browserify Plugin for Adding Header Comment", | ||
@@ -5,0 +5,0 @@ "keywords": [ "browserify-plugin", "browserify", "plugin", "header", "comment" ], |
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
7123
70