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.0-beta7 to 3.0.0-beta8

2

package.json

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

],
"version": "3.0.0-beta7",
"version": "3.0.0-beta8",
"repository": {

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

@@ -20,8 +20,9 @@ Minifyify

, minifyify = require('minifyify')
, bundle = new browserify();
, bundler = new browserify();
, minifier = new minifyify();
bundle.transform({global: true}, minifier.transform);
bundler.add('entry.js');
bundler.transform({global: true}, minifier.transform);
bundle('entry.js')
bundler
.bundle({debug: true})

@@ -39,3 +40,3 @@ .pipe(minifier.consumer(function (err, src, map) {

, minifyify = require('minifyify')
, bundle
, bundler
, minifier

@@ -49,14 +50,16 @@ , options = {

bundle = new browserify();
bundler = new browserify();
minifier = new minifyify(options);
bundler.add('entry.js')
// Your other transforms
bundle.transform(require('coffeeify'));
bundle.transform(require('hbsfy'));
bundler.transform(require('coffeeify'));
bundler.transform(require('hbsfy'));
// Minifies code while tracking sourcemaps
// {global: true} lets us also minify browser shims
bundle.transform({global: true}, minifier.transform);
bundler.transform({global: true}, minifier.transform);
bundle('entry.js')
bundler
// Debug must be true for minifyify to work

@@ -97,2 +100,6 @@ .bundle({debug: true})

* Why is this not a *real* transform?
At this time of writing it is not possible to acheive what minifyify does with a pure transform. Minifyify needs to transform browserify's source map, which is only appended after all transforms have run and the bundling process is complete. That is the job of the `.consumer()` function.
* Wait.. Why did the total size (souce code + map) get BIGGER??

@@ -99,0 +106,0 @@

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