Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

broccoli-terser-sourcemap

ember-cli459kMIT4.1.1

Broccoli filter to minify files with terser while preserving their sourcemaps.

readme

Build Status

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

installation

npm install --save broccoli-terser-sourcemap

usage

const Terser = require('broccoli-terser-sourcemap');

// basic usage
let minified = new Terser(input);

// advanced usage
let minified = new Terser(input, {
  exclude: [..], // array of globs, to not minify

  terser: {
    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

changelog

Version 9 of Highlight.js has reached EOL and is no longer supported. Please upgrade or ask whatever dependency you are using to upgrade. https://github.com/highlightjs/highlight.js/issues/2877

v4.1.1 (2023-10-31)

:bug: Bug Fix

:house: Internal

Committers: 3

v4.1.0 (2020-09-08)

:rocket: Enhancement

Committers: 1

v4.0.0 (2020-09-04)

:boom: Breaking Change

:rocket: Enhancement

  • #248 Remove mkdirp usage in favor of fs.mkdirSync(path, { recursive: true }); (@rwjblue)
  • #238 Fix deprecation warning for options.nodeWorker by updating workerpool to 6.0.0 (@theenadayalank)

:house: Internal

Committers: 3

v3.2.0 (2019-10-18)

:rocket: Enhancement

Committers: 2

v3.1.1 (2019-04-16)

  • Fix sources: ["0"], output the correct source (@xg-wang)

v3.1.0 (2019-03-22)

:rocket: Enhancement

Committers: 1

v3.0.0 (2019-02-25)

:boom: Breaking Change

:rocket: Enhancement

:house: Internal

  • #106 TravisCI: Remove deprecated sudo: false option (@Turbo87)

Committers: 3

v2.2.0 (2018-05-28)

:rocket: Enhancement

  • #70 Replace unmaintained uglify-es with terser. (@Turbo87)

:memo: Documentation

:house: Internal

Committers: 2

v2.1.1 (2018-03-27)

:bug: Bug Fix

  • #64 JOBS environment variable should override concurrency. (@mikrostew)

Committers: 1

v2.1.0 (2018-03-27)

:rocket: Enhancement

:memo: Documentation

Committers: 2

v2.0.2 (2018-01-11)

:bug: Bug Fix

  • #59 Do not try to access length of minified code if minification failed. (@kmoe)

:memo: Documentation

Committers: 2

v2.0.1 (2017-11-16)

:bug: Bug Fix

  • #55 Ignore missing sourcemap if referenced file does not exist. (@Turbo87)

Committers: 1

v2.0.0 (2017-10-03)

:rocket: Enhancement

:house: Internal

Committers: 1

v2.0.0-beta.2 (2017-07-10)

:boom: Breaking Change

Committers: 1

v2.0.0-beta.1 (2017-07-09)

:boom: Breaking Change

:house: Internal

  • #48 Remove unused "origSourcesContent" variable. (@Turbo87)
  • #45 CI: Use "auto-dist-tag" for deployment. (@Turbo87)

Committers: 1

v1.5.2 (2017-03-31)

:bug: Bug Fix

:house: Internal

Committers: 1

v1.5.1 (2016-12-20)

:rocket: Enhancement

Committers: 1

v1.5.0 (2016-12-03)

:rocket: Enhancement

  • #35 Update uglify-js to ^2.7.0.. (@tjni)

:bug: Bug Fix

Committers: 2

  • Eli Flanagan (efx)
  • Theodore Ni (tjni)

v1.4.1 (2016-08-05)

:house: Internal

  • #32 Whitelist files for npm and reduce lodash dependency. (@kamalaknn)

Committers: 1

v1.4.0 (2016-05-20)

:rocket: Enhancement

:bug: Bug Fix

Committers: 2

v1.3.0 (2016-04-27)

:rocket: Enhancement

:bug: Bug Fix

  • #27 Revert "don’t minify files that already advertise as minified.". (@rwjblue)

Committers: 2

v1.2.0 (2016-03-04)

:rocket: Enhancement

:bug: Bug Fix

  • #22 [DOCFIX] Update the README.md to reflect the real package name.. (@minasmart)

Committers: 2

v1.1.1 (2016-01-09)

:house: Internal

  • #21 Upgrade to a supported version of lodash.. (@blimmer)

Committers: 1

v1.1.0 (2015-11-17)

:rocket: Enhancement

:bug: Bug Fix

:memo: Documentation

:house: Internal

Committers: 3

v1.0.1 (2015-06-18)

:bug: Bug Fix

Committers: 1

v1.0.0 (2015-06-07)

:rocket: Enhancement

Committers: 1