Comparing version 3.0.0-beta7 to 3.0.0-beta8
@@ -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 @@ |
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
655607
147
10287