Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gruntjs/grunt-contrib-uglify
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.0
Choose a base ref
...
head repository: gruntjs/grunt-contrib-uglify
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.8.1
Choose a head ref
  • 9 commits
  • 12 files changed
  • 4 contributors

Commits on Feb 24, 2015

  1. bump chalk

    sindresorhus committed Feb 24, 2015
    Copy the full SHA
    a0ab9c5 View commit details

Commits on Feb 26, 2015

  1. Update JSHint's options.

    XhmikosR committed Feb 26, 2015
    Copy the full SHA
    dbf4317 View commit details

Commits on Mar 4, 2015

  1. Update appveyor.yml.

    XhmikosR committed Mar 4, 2015
    Copy the full SHA
    e18fb37 View commit details

Commits on Mar 13, 2015

  1. Update appveyor.yml.

    Use variables for cache items.
    XhmikosR committed Mar 13, 2015
    Copy the full SHA
    8f9bb92 View commit details

Commits on Mar 29, 2015

  1. FIXED version of uglifyjs

    alonisser committed Mar 29, 2015
    Copy the full SHA
    21c2c7f View commit details

Commits on Mar 30, 2015

  1. Merge pull request #314 from alonisser/master

    FIXED version of uglifyjs
    vladikoff committed Mar 30, 2015
    Copy the full SHA
    6ebd208 View commit details
  2. v0.8.2 version lock

    vladikoff committed Mar 30, 2015
    1
    Copy the full SHA
    54f3d46 View commit details
  3. fix sourcemap issues

    vladikoff committed Mar 30, 2015
    Copy the full SHA
    456d6a4 View commit details
  4. v0.8.1 readme updates

    vladikoff committed Mar 30, 2015
    Copy the full SHA
    eaa82c5 View commit details
7 changes: 4 additions & 3 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"node": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true
"unused": true
}
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.8.1:
date: 2015-02-19
changes:
- lock uglify to 2.4.17 due to breaking changes
v0.8.0:
date: 2015-02-19
changes:
5 changes: 3 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -225,7 +225,8 @@ module.exports = function(grunt) {
sourceMap: true,
sourceMapIn: function() {
return 'test/fixtures/src/simple2.map';
}
},
sourceMapIncludeSources: false
}
},
sourcemap_sources: {
@@ -284,7 +285,7 @@ module.exports = function(grunt) {

var done = this.async();

function onComplete(error, result, code) {
function onComplete(error, result) {
grunt.log.write("\n > " + result.stdout.split("\n").join("\n > ") + "\n");
var rv = error ? true : new Error("Task " + task + " unexpectedly passed.");
done(rv);
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# grunt-contrib-uglify v0.8.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 v0.8.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)

> Minify files with UglifyJS.
@@ -432,6 +432,7 @@ grunt.initConfig({

## Release History

* 2015-02-19   v0.8.1   lock uglify to 2.4.17 due to breaking changes
* 2015-02-19   v0.8.0   Add `screwIE8` option. Fix issue with explicit `compress` in node 0.12.0.
* 2014-12-23   v0.7.0   Adds sourceMapRoot options. Updates readme descriptions. Removes reference to cleancss.
* 2014-09-17   v0.6.0   Output fixes. ASCIIOnly option. Other fixes.
@@ -459,4 +460,4 @@ grunt.initConfig({

Task submitted by ["Cowboy" Ben Alman](http://benalman.com)

*This file was generated on Thu Feb 19 2015 16:25:10.*
*This file was generated on Mon Mar 30 2015 16:33:34.*
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ init:
# What combinations to test
environment:
matrix:
- nodejs_version: 1.0
- nodejs_version: 1
- nodejs_version: 0.12
- nodejs_version: 0.10

@@ -32,6 +32,6 @@ matrix:
fast_finish: true

cache:
- C:\Users\appveyor\AppData\Roaming\npm\node_modules # global npm modules
- C:\Users\appveyor\AppData\Roaming\npm-cache # npm cache
- node_modules # local npm modules
- '%APPDATA%\npm\node_modules -> package.json' # global npm modules
- '%APPDATA%\npm-cache -> package.json' # npm cache
- 'node_modules -> package.json' # local npm modules
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-contrib-uglify",
"description": "Minify files with UglifyJS.",
"version": "0.8.0",
"version": "0.8.1",
"author": {
"name": "Grunt Team",
"url": "http://gruntjs.com/"
@@ -20,10 +20,10 @@
"test": "grunt test"
},
"dependencies": {
"chalk": "^0.5.1",
"chalk": "^1.0.0",
"lodash": "^3.2.0",
"maxmin": "^1.0.0",
"uglify-js": "^2.4.0",
"uglify-js": "2.4.17",
"uri-path": "0.0.2"
},
"devDependencies": {
5 changes: 3 additions & 2 deletions tasks/lib/uglify.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@

// External libs.
var path = require('path');
var fs = require('fs');
var UglifyJS = require('uglify-js');
var _ = require('lodash');
var uriPath = require('uri-path');
@@ -175,7 +174,6 @@ exports.init = function(grunt) {
if (options.sourceMap) {

var destBasename = path.basename(dest);
var destPath = path.dirname(dest);
var sourceMapIn;
if (options.sourceMapIn) {
sourceMapIn = grunt.file.readJSON(options.sourceMapIn);
@@ -191,6 +189,9 @@ exports.init = function(grunt) {
});
}

if (options.sourceMapIn) {
outputOptions.source_map.get()._file = destBasename;
}
}

if (options.indentLevel !== undefined) {
2 changes: 1 addition & 1 deletion tasks/uglify.js
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ module.exports = function(grunt) {
});

if (createdMaps > 0) {
grunt.log.ok(createdMaps + ' source' + grunt.util.pluralize(this.files.length, 'map/maps') + ' created.');
grunt.log.ok(createdMaps + ' source' + grunt.util.pluralize(createdMaps, 'map/maps') + ' created.');
}

if (createdFiles > 0) {
3 changes: 2 additions & 1 deletion test/fixtures/expected/comments.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*!
* I am a comment
*/
function foo(){return 42}// @preserve preserve
function foo(){return 42}
// @preserve preserve
// @license license
function bar(){return 2*foo()}/* @preserve
* multiline preserve
11 changes: 7 additions & 4 deletions test/fixtures/expected/maxLineLen.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
void function(){var cubes,list,math,number,opposite,race,square;number=42,opposite=!0,opposite&&(number=-42),square=function(x){return x*x
},list=[1,2,3,4,5],math={root:Math.sqrt,square:square,cube:function(x){return x*square(x)}},race=function(winner,runners){return runners=2<=arguments.length?[].slice.call(arguments,1):[],print(winner,runners)
},"undefined"!=typeof elvis&&null!=elvis&&alert("I knew it!"),cubes=function(accum$){for(var num,i$=0,length$=list.length;length$>i$;++i$)num=list[i$],accum$.push(math.cube(num));
return accum$}.call(this,[])}.call(this);
void function(){var cubes,list,math,number,opposite,race,square;number=42,opposite=!0,opposite&&(number=-42),
square=function(x){return x*x},list=[1,2,3,4,5],math={root:Math.sqrt,square:square,cube:function(x){return x*square(x);

}},race=function(winner,runners){return runners=2<=arguments.length?[].slice.call(arguments,1):[],print(winner,runners);

},"undefined"!=typeof elvis&&null!=elvis&&alert("I knew it!"),cubes=function(accum$){for(var num,i$=0,length$=list.length;length$>i$;++i$)num=list[i$],
accum$.push(math.cube(num));return accum$}.call(this,[])}.call(this);
2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemapin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemapin_sources.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.