diff --git a/CHANGELOG b/CHANGELOG index f137ea4c..019ed1c3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +v1.0.0: + date: 2016-03-04 + changes: + - Use uglify-js ~2.6.2 to fix sourcemap issue. + - Improving docs for global-defs and --define options. + - Add 'sourceMapUrl' option. + - add bare_returns option. + - Optionally set report verbosity level using report option. v0.11.1: date: 2016-01-29 changes: diff --git a/README.md b/README.md index be18f647..3247137a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# grunt-contrib-uglify v0.11.1 [![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 v1.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) > Minify javascript files with UglifyJS @@ -121,6 +121,12 @@ With this option you can customize root URL that browser will use when looking f If the sources are not absolute URLs after prepending of the `sourceMapRoot`, the sources are resolved relative to the source map. +#### sourceMapUrl +Type: `String` +Default: `undefined` + +Override the calculated value for `sourceMappingURL` in the source map. This is useful if the source map location is not relative to the base path of the minified file, i.e. when using a CDN + ###### enclose Type: `Object` Default: `undefined` @@ -511,6 +517,7 @@ grunt.initConfig({ ## Release History + * 2016-03-04   v1.0.0   Use uglify-js ~2.6.2 to fix sourcemap issue. Improving docs for global-defs and --define options. Add 'sourceMapUrl' option. add bare_returns option. Optionally set report verbosity level using report option. * 2016-01-29   v0.11.1   switch to lodash ^4.0.1 switch to grunt-contrib-clean ^0.7.0 switch to grunt-contrib-jshint ^0.12.0 * 2015-11-20   v0.11.0   switch to uglify ~2.6.0 * 2015-11-12   v0.10.1   switch to uglify ~2.5 @@ -546,4 +553,4 @@ grunt.initConfig({ Task submitted by ["Cowboy" Ben Alman](http://benalman.com) -*This file was generated on Tue Feb 02 2016 12:54:04.* +*This file was generated on Fri Mar 04 2016 12:46:01.* diff --git a/docs/uglify-options.md b/docs/uglify-options.md index 03a5563c..c502114c 100644 --- a/docs/uglify-options.md +++ b/docs/uglify-options.md @@ -31,11 +31,12 @@ Default: `false` Parse a single expression, rather than a program (for parsing JSON) ## report -Choices: `'min'`, `'gzip'` +Choices: `false, 'none', 'min'`, `'gzip'` Default: `'min'` Either report only minification result or report minification and gzip results. This is useful to see exactly how well clean-css is performing but using `'gzip'` will make the task take 5-10x longer to complete. [Example output](https://github.com/sindresorhus/maxmin#readme). +If false or 'none' is used the report will be generated on the verbose output. ## sourceMap Type: `Boolean` diff --git a/package.json b/package.json index 2a532350..6f05d583 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-contrib-uglify", "description": "Minify javascript files with UglifyJS", - "version": "0.11.1", + "version": "1.0.0", "author": { "name": "Grunt Team", "url": "http://gruntjs.com/" diff --git a/test/fixtures/expected/sourcemapin.js.map b/test/fixtures/expected/sourcemapin.js.map index 90a957fb..9d027124 100644 --- a/test/fixtures/expected/sourcemapin.js.map +++ b/test/fixtures/expected/sourcemapin.js.map @@ -1 +1 @@ -{"version":3,"sources":["../test/fixtures/src/simple2.coffee"],"names":["number","opposite","square","x","list","math","root","Math","sqrt","cube","race","winner","runners","arguments","length","slice","call","print","elvis","alert","cubes","accum$","i$","length$","num"],"mappings":"AAAC;;+DACAA,QAAW,GACXC,UAAW,EAGKA,WAAhBD,OAAS,KAGTE,OAAS,SAAAC,SAAOA,GAAIA,GAGpBC,MAAQ,EAAG,EAAG,EAAG,EAAG,GAGpBC,MACGC,KAAQC,KAAIC,KACbN,OAAQA,OACRO,KA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, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"]} \ No newline at end of file +{"version":3,"sources":["../test/fixtures/src/simple2.coffee"],"names":["number","opposite","square","x","list","math","root","Math","sqrt","cube","race","winner","runners","arguments","length","slice","call","print","elvis","alert","cubes","accum$","i$","length$","num"],"mappings":";;+DACCA,QAAW,GACXC,UAAW,EAGKA,WAAhBD,OAAS,KAGTE,OAAS,SAAAC,SAAOA,GAAIA,GAGpBC,MAAQ,EAAG,EAAG,EAAG,EAAG,GAGpBC,MACGC,KAAQC,KAAIC,KACbN,OAAQA,OACRO,KAAQ,SAAAN,SAAOA,GAAID,OAAOC,KAG1BO,KAAO,SAAAC,OAAAC,eAASA,SAAA,GAAAC,UAAAC,UAAAC,MAAAC,KAAAH,UAAA,MACfI,MAAMN,OAAQC,UAGf,mBAAsBM,QAAA,MAAAA,OAAtBC,MAAM,cAGRC,MAAA,SAAAC,QAAS,IAAA,QAAAC,GAAA,EAAAC,QAAyBnB,KAAAU,OAAzBS,QAAAD,KAAAA,GAAkBE,IAAOpB,KAAAkB,gBAAzBjB,KAAII,KAAMe","file":"sourcemapin.js"} \ No newline at end of file diff --git a/test/fixtures/expected/sourcemapin_sources.js.map b/test/fixtures/expected/sourcemapin_sources.js.map index 71cafbd3..78a71293 100644 --- a/test/fixtures/expected/sourcemapin_sources.js.map +++ b/test/fixtures/expected/sourcemapin_sources.js.map @@ -1 +1 @@ -{"version":3,"sources":["../test/fixtures/src/simple2.coffee"],"names":["number","opposite","square","x","list","math","root","Math","sqrt","cube","race","winner","runners","arguments","length","slice","call","print","elvis","alert","cubes","accum$","i$","length$","num"],"mappings":"AAAC,iCACAA,GAAW,GACXC,GAAW,EAGKA,IAAhBD,EAAS,KAGTE,EAAS,SAAAC,SAAOA,GA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Assignment:\nnumber = 42\nopposite = true\n\n# Conditions:\nnumber = -42 if opposite\n\n# Functions:\nsquare = (x) -> x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"]} \ No newline at end of file +{"version":3,"sources":["../test/fixtures/src/simple2.coffee"],"names":["number","opposite","square","x","list","math","root","Math","sqrt","cube","race","winner","runners","arguments","length","slice","call","print","elvis","alert","cubes","accum$","i$","length$","num"],"mappings":"iCACCA,GAAW,GACXC,GAAW,EAGKA,IAAhBD,EAAS,KAGTE,EAAS,SAAAC,SAAOA,GAAIA,GAGpBC,GAAQ,EAAG,EAAG,EAAG,EAAG,GAGpBC,GACGC,KAAQC,KAAIC,KACbN,OAAQA,EACRO,KAAQ,SAAAN,SAAOA,GAAID,EAAOC,KAG1BO,EAAO,SAAAC,EAAAC,SAASA,GAAA,GAAAC,UAAAC,UAAAC,MAAAC,KAAAH,UAAA,MACfI,MAAMN,EAAQC,IAGf,mBAAsBM,QAAA,MAAAA,OAAtBC,MAAM,cAGRC,EAAA,SAAAC,GAAS,IAAA,MAAAC,EAAA,EAAAC,EAAyBnB,EAAAU,OAAzBS,EAAAD,IAAAA,EAAkBE,EAAOpB,EAAAkB,UAAzBjB,EAAII,KAAMe","file":"sourcemapin_sources.js","sourcesContent":["# Assignment:\nnumber = 42\nopposite = true\n\n# Conditions:\nnumber = -42 if opposite\n\n# Functions:\nsquare = (x) -> x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"]} \ No newline at end of file