Broccoli filter to uglify with sourcemaps
JavaScript HTML
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.babelrc
.eslintrc.js
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
jest-eslint.config.js
jest-test.config.js
package.json
yarn.lock

README.md

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