grunt-contrib-uglify
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "grunt-contrib-uglify", | ||
"description": "Minify JavaScript files with UglifyJS", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"author": { | ||
@@ -20,4 +20,4 @@ "name": "Grunt Team", | ||
"chalk": "^1.0.0", | ||
"lodash.assign": "^4.0.9", | ||
"maxmin": "^1.1.0", | ||
"object.assign": "^4.0.4", | ||
"uglify-js": "~2.7.0", | ||
@@ -24,0 +24,0 @@ "uri-path": "^1.0.0" |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-uglify v2.0.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-uglify.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ybtf5vbvtenii561/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-uglify/branch/master) | ||
# grunt-contrib-uglify v2.1.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-uglify.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ybtf5vbvtenii561/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-uglify/branch/master) | ||
@@ -35,16 +35,16 @@ > Minify JavaScript files with UglifyJS | ||
`sourceMappingURL` - This is calculated automatically now | ||
`sourceMapPrefix` - No longer necessary for the above reason | ||
* `sourceMappingURL` - This is calculated automatically now | ||
* `sourceMapPrefix` - No longer necessary for the above reason | ||
#### Changed options | ||
`sourceMap` - Only accepts a `Boolean` value. Generates a map with a default name for you | ||
`sourceMapRoot` - The location of your sources is now calculated for you when `sourceMap` is set to `true` but you can set manual source root if needed | ||
* `sourceMap` - Only accepts a `Boolean` value. Generates a map with a default name for you | ||
* `sourceMapRoot` - The location of your sources is now calculated for you when `sourceMap` is set to `true` but you can set manual source root if needed | ||
#### New options | ||
`sourceMapName` - Accepts a string or function to change the location or name of your map | ||
`sourceMapIncludeSources` - Embed the content of your source files directly into the map | ||
`expression` - Accepts a `Boolean` value. Parse a single expression (JSON or single functions) | ||
`quoteStyle` - Accepts integers `0` (default), `1`, `2`, `3`. Enforce or preserve quotation mark style. | ||
* `sourceMapName` - Accepts a string or function to change the location or name of your map | ||
* `sourceMapIncludeSources` - Embed the content of your source files directly into the map | ||
* `expression` - Accepts a `Boolean` value. Parse a single expression (JSON or single functions) | ||
* `quoteStyle` - Accepts integers `0` (default), `1`, `2`, `3`. Enforce or preserve quotation mark style. | ||
@@ -84,3 +84,3 @@ ### Options | ||
#### report | ||
Choices: `'none'`, `'min'`, `'gzip'` | ||
Choices: `'none'`, `'min'`, `'gzip'` | ||
Default: `'min'` | ||
@@ -99,3 +99,3 @@ | ||
#### sourceMapName | ||
Type: `String` `Function` | ||
Type: `String` `Function` | ||
Default: `undefined` | ||
@@ -106,3 +106,3 @@ | ||
#### sourceMapIn | ||
Type: `String` `Function` | ||
Type: `String` `Function` | ||
Default: `undefined` | ||
@@ -176,4 +176,5 @@ | ||
- `'all'` will preserve all comments in code blocks that have not been squashed or dropped | ||
- `'some'` will preserve all comments that start with a bang (`!`) or include a closure compiler style directive (`@preserve` `@license` `@cc_on`) | ||
- `'some'` will preserve all comments that include a closure compiler style directive (`@preserve` `@license` `@cc_on`) | ||
- `Function` specify your own comment preservation function. You will be passed the current node and the current comment and are expected to return either `true` or `false` | ||
- `RegExp` `'/[RegExp]/'` will preserve comments matching given RegExp or stringified RegExp | ||
@@ -199,3 +200,3 @@ #### banner | ||
#### mangleProperties | ||
Type: `Boolean` `Object` | ||
Type: `Boolean` `Object` | ||
Default: `false` | ||
@@ -300,4 +301,4 @@ | ||
Generate a source map by setting the `sourceMap` option to `true`. The generated | ||
source map will be in the same directory as the destination file. Its name will be the | ||
basename of the destination file with a `.map` extension. Override these | ||
source map will be in the same directory as the destination file. Its name will be | ||
the basename of the destination file with a `.map` extension. Override these | ||
defaults with the `sourceMapName` attribute. | ||
@@ -527,2 +528,3 @@ | ||
* 2017-02-08 v2.1.0 Show size changes in output. Switch to `object.assign`. | ||
* 2016-07-19 v2.0.0 Update uglify-js to v2.7.0. `screwIE8` is enabled by default. | ||
@@ -567,2 +569,2 @@ * 2016-07-19 v1.0.2 Update grunt to ^1.0.0. Fix `beautify` when passed as an object. Fix docs about `report` values. | ||
*This file was generated on Tue Jul 19 2016 16:46:21.* | ||
*This file was generated on Wed Feb 08 2017 11:06:25.* |
@@ -14,3 +14,3 @@ /* | ||
var UglifyJS = require('uglify-js'); | ||
var assign = require('lodash.assign'); | ||
var assign = require('object.assign'); | ||
var uriPath = require('uri-path'); | ||
@@ -17,0 +17,0 @@ var getOutputOptions; |
@@ -27,2 +27,16 @@ /* | ||
function reportFacility(grunt, options) { | ||
var reporter; | ||
switch (options.report) { | ||
case 'none': | ||
reporter = grunt.verbose; | ||
break; | ||
default: | ||
case 'min': | ||
case 'gzip': | ||
reporter = grunt.log; | ||
} | ||
return reporter; | ||
} | ||
// Converts \r\n to \n | ||
@@ -54,2 +68,3 @@ function normalizeLf(string) { | ||
}); | ||
var log = reportFacility(grunt, options); | ||
@@ -172,3 +187,3 @@ // Process banner. | ||
grunt.file.write(options.generatedSourceMapName, result.sourceMap); | ||
grunt.verbose.writeln('File ' + chalk.cyan(options.generatedSourceMapName) + ' created (source map).'); | ||
log.writeln('File ' + chalk.cyan(options.generatedSourceMapName) + ' created (source map).'); | ||
createdMaps++; | ||
@@ -178,3 +193,3 @@ } | ||
var outputSize = maxmin(result.max, output, options.report === 'gzip'); | ||
grunt.verbose.writeln('File ' + chalk.cyan(f.dest) + ' created: ' + outputSize); | ||
log.writeln('File ' + chalk.cyan(f.dest) + ' created: ' + outputSize); | ||
@@ -181,0 +196,0 @@ createdFiles++; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40509
419
562
+ Addedobject.assign@^4.0.4
+ Addedcall-bind@1.0.7(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedset-function-length@1.2.2(transitive)
- Removedlodash.assign@^4.0.9
- Removedlodash.assign@4.2.0(transitive)