Skip to content

vertragswecker/broccoli-uglify-sourcemap

 
 

Repository files navigation

Build Status

A broccoli filter that applies uglify-js while properly generating or maintaining sourcemaps.

installation

npm install --save broccoli-uglify-sourcemap

usage

var uglify = require('broccoli-uglify-sourcemap');

// basic usage
var uglified = uglify(input);

// advanced usage
var uglified = uglify(input, {
  exclude: [..], // array of globs, to not minify

  uglify: {
    mangle: false,    // defaults to true
    compress: false,  // defaults to true
    sourceMap: false, // defaults to true
    //...
  },

  async: true,   // run uglify in parallel, defaults to false
  concurrency: 3 // number of parallel workers, defaults to number of CPUs - 1
});

To disable parallelization:

$ JOBS=0
$ JOBS=1

About

Broccoli filter to uglify with sourcemaps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.8%
  • HTML 3.2%