broccoli-uglify-sourcemap

Broccoli filter to uglify files while preserving their sourcemaps.

MIT 27 个版本
安装
npm install broccoli-uglify-sourcemap
yarn add broccoli-uglify-sourcemap
pnpm add broccoli-uglify-sourcemap
bun add broccoli-uglify-sourcemap
README

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
版本列表
4.0.0 2020-09-04
3.2.0 2019-10-18
3.1.1 2019-04-16
3.1.0 2019-03-22
3.0.0 2019-02-26
2.2.0 2018-05-28
2.1.1 2018-03-26
2.1.0 2018-03-26
2.0.2 2018-01-11
2.0.1 2017-11-16
2.0.0-beta.2 2017-07-10
2.0.0-beta.1 2017-07-09
2.0.0 2017-10-03
1.5.2 2017-04-01
1.5.1 2016-12-20
1.4.2 2016-09-15
1.4.1 2016-08-05
1.4.0 2016-05-20
1.3.0 2016-04-27
1.2.0 2016-03-04
1.1.1 2016-01-09
1.1.0 2015-11-18
1.0.1 2015-06-18
1.0.0 2015-06-07
0.2.1 2014-12-24
0.2.0 2014-12-24
0.1.0 2014-12-14