Skip to content

Latest commit

 

History

History
47 lines (26 loc) · 1.33 KB

1to2.md

File metadata and controls

47 lines (26 loc) · 1.33 KB

Upgrading from version 1 to 2

This document describes the breaking API changes between versions 1 and 2 of the plugin.

Options removed

  • options.compress

    Use options.uglify.compress instead (see UglifyJS docs).

  • options.nameTemplate

    Removed to simplify the code.

    Individual files will be compressed from NAME.js to NAME.min.js. Set options.sameName to keep the name as is.

    Concatenated files will be compressed to scripts.min.js, or the name set by options.concat.file.

  • options.order

    Use options.files instead.

  • options.output

    Use options.uglify.output instead (see UglifyJS docs).

  • options.preserveComments

    Use options.uglify.output.comments instead (see UglifyJS docs).

  • options.sourceMap

    Source maps will now be generated by default. To disable, set options.uglify.sourceMap to false.

Options changed

  • options.filter [Function]

    This option can only be set to a function. By default .min.js files will be excluded.

  • options.concat [Object]

    This option can only be set to an object. See README for details.