Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minifyify

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minifyify - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

43

lib/index.js

@@ -63,22 +63,35 @@ var plugin

bundleStream.pipe(minifier.consumer(function (err, src, map) {
// If there was a callback given, we are done
if(typeof bundleCb == 'function') {
return bundleCb(err, src, map);
}
var finish;
// Otherwise, throw if anything bad happened
if(err) { throw err; }
// A callback we'll need later
finish = function () {
// Otherwise, throw if anything bad happened
if(err) { throw err; }
// Push the minified src to our proxied stream
minifiedStream._read = function () {
minifiedStream.push(src);
minifiedStream.push(null);
}
minifiedStream.resume();
minifiedStream.emit('readable');
if(typeof bundleCb == 'function') {
return bundleCb(err, src, map);
}
};
// Write the sourcemap to the specified output location
var writeStream = fs.createWriteStream(minifyifyOpts.output);
writeStream.write(map);
writeStream.end();
if(minifyifyOpts.output) {
var writeStream = fs.createWriteStream(minifyifyOpts.output);
// Push the minified src to our proxied stream
minifiedStream._read = function () {
minifiedStream.push(src);
minifiedStream.push(null);
// Delay completion until the map is written
writeStream.on('close', finish);
writeStream.write(map);
writeStream.end();
}
minifiedStream.resume();
minifiedStream.emit('readable');
else {
finish();
}
}));

@@ -85,0 +98,0 @@

@@ -21,3 +21,3 @@ {

],
"version": "3.0.4",
"version": "3.0.5",
"repository": {

@@ -24,0 +24,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc