1.2.0 • Published 7 years ago

optimizify v1.2.0

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

optimizify

Browserify transform for optimize-js.

This is just a simple transformation that applies optimize-js. See the documentation there about what it does and how you should check whether this would be useful to you or not.

This is used as any browserify transform, apply it with browserify.transform in your package.json, with the -t or -g flag on the CLI, with b.transform()

IMPORTANT NOTE: in order for this to actually work, it needs to run after Uglify.

Options

You can prevent files from being optimized by passing a filter RegExp or string

var bundler = browserify('index.js')

bundler.transform('optimizify', { filter: /\.json/ })
  .bundle()
  .pipe(process.stdout)

or

browserify -g [ optimizify --filter '.json' ] ./index.js