Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

scienceai/optimizify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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