broccoli-uglify-sourcemap

    4.0.0 • Public • Published

    Build Status

    A broccoli filter that applies terser to uglify code while properly generating or maintaining sourcemaps.

    installation

    npm install --save broccoli-uglify-sourcemap

    usage

    const Uglify = require('broccoli-uglify-sourcemap');
     
    // basic usage
    let uglified = new Uglify(input);
     
    // advanced usage
    let uglified = new 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
        //...
      },
     
      publicUrl: 'https://myamazingapp.com/', // value to be prepended to sourceMappingURL, defaults to ''
      hiddenSourceMap: false, // skips adding the reference to sourcemap in the minified JS, defaults to false
     
      concurrency: 3 // number of parallel workers, defaults to number of CPUs - 1
    });

    To disable parallelization:

    $ JOBS=0
    $ JOBS=1
    

    Keywords

    none

    Install

    npm i broccoli-uglify-sourcemap

    DownloadsWeekly Downloads

    66,251

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    25.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar