grunt-contrib-uglify
Advanced tools
Comparing version 0.3.3 to 0.4.0
{ | ||
"name": "grunt-contrib-uglify", | ||
"description": "Minify files with UglifyJS.", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-uglify", | ||
@@ -24,3 +24,3 @@ "author": { | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">=0.10.0" | ||
}, | ||
@@ -31,15 +31,15 @@ "scripts": { | ||
"dependencies": { | ||
"uglify-js": "~2.4.0", | ||
"grunt-lib-contrib": "~0.6.1", | ||
"chalk": "~0.4.0" | ||
"uglify-js": "^2.4.0", | ||
"chalk": "^0.4.0", | ||
"maxmin": "^0.1.0" | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "~0.6.3", | ||
"grunt-contrib-nodeunit": "~0.2.0", | ||
"grunt-contrib-clean": "~0.5.0", | ||
"grunt-contrib-internal": "~0.4.2", | ||
"grunt": "~0.4.0" | ||
"grunt-contrib-jshint": "^0.8.0", | ||
"grunt-contrib-nodeunit": "^0.3.2", | ||
"grunt-contrib-clean": "^0.5.0", | ||
"grunt-contrib-internal": "^0.4.2", | ||
"grunt": "^0.4.2" | ||
}, | ||
"peerDependencies": { | ||
"grunt": "~0.4.0" | ||
"grunt": "^0.4.0" | ||
}, | ||
@@ -46,0 +46,0 @@ "keywords": [ |
@@ -1,2 +0,2 @@ | ||
# grunt-contrib-uglify v0.3.3 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-uglify.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) | ||
# grunt-contrib-uglify v0.4.0 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-uglify.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) | ||
@@ -8,3 +8,3 @@ > Minify files with UglifyJS. | ||
## Getting Started | ||
This plugin requires Grunt `~0.4.0` | ||
This plugin requires Grunt `^0.4.0` | ||
@@ -76,15 +76,8 @@ If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: | ||
#### report | ||
Choices: `false` `'min'` `'gzip'` | ||
Default: `false` | ||
Choices: `'min'`, `'gzip'` | ||
Default: `'min'` | ||
Either do not report anything, report only minification result, or report minification and gzip results. This is useful to see exactly how well Uglify is performing, but using `'gzip'` can add 5-10x runtime task execution. | ||
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). | ||
Example ouput using `'gzip'`: | ||
``` | ||
Original: 198444 bytes. | ||
Minified: 101615 bytes. | ||
Gzipped: 20084 bytes. | ||
``` | ||
#### sourceMap | ||
@@ -403,3 +396,3 @@ Type: `Boolean` | ||
* 2013-02-27 v0.3.3 remove unnecessary calls to `grunt.template.process` | ||
* 2014-02-27 v0.3.3 remove unnecessary calls to `grunt.template.process` | ||
* 2014-01-22 v0.3.2 fix handling of `sourceMapIncludeSources` option. | ||
@@ -426,2 +419,2 @@ * 2014-01-20 v0.3.1 fix relative path issue in sourcemaps | ||
*This file was generated on Thu Feb 27 2014 17:22:46.* | ||
*This file was generated on Sat Mar 01 2014 20:36:24.* |
@@ -5,3 +5,3 @@ /* | ||
* | ||
* Copyright (c) 2013 "Cowboy" Ben Alman, contributors | ||
* Copyright (c) 2014 "Cowboy" Ben Alman, contributors | ||
* Licensed under the MIT license. | ||
@@ -8,0 +8,0 @@ */ |
@@ -12,2 +12,4 @@ /* | ||
var path = require('path'); | ||
var chalk = require('chalk'); | ||
var maxmin = require('maxmin'); | ||
@@ -39,9 +41,5 @@ // Generate the default source map name | ||
module.exports = function(grunt) { | ||
// Internal lib. | ||
var contrib = require('grunt-lib-contrib').init(grunt); | ||
var uglify = require('./lib/uglify').init(grunt); | ||
var chalk = require('chalk'); | ||
grunt.registerMultiTask('uglify', 'Minify files with UglifyJS.', function() { | ||
@@ -57,3 +55,3 @@ // Merge task-specific and/or target-specific options with these defaults. | ||
beautify: false, | ||
report: false | ||
report: 'min' | ||
}); | ||
@@ -71,3 +69,3 @@ | ||
if (!grunt.file.exists(filepath)) { | ||
grunt.log.warn('Source file "' + filepath + '" not found.'); | ||
grunt.log.warn('Source file ' + chalk.cyan(filepath) + ' not found.'); | ||
return false; | ||
@@ -80,3 +78,3 @@ } else { | ||
if (src.length === 0) { | ||
grunt.log.warn('Destination (' + f.dest + ') not written because src files were empty.'); | ||
grunt.log.warn('Destination ' + chalk.cyan(f.dest) + ' not written because src files were empty.'); | ||
return; | ||
@@ -148,3 +146,3 @@ } | ||
err.origError = e; | ||
grunt.log.warn('Uglifying source "' + src + '" failed.'); | ||
grunt.log.warn('Uglifying source ' + chalk.cyan(src) + ' failed.'); | ||
grunt.fail.warn(err); | ||
@@ -170,12 +168,6 @@ } | ||
// Print a success message. | ||
grunt.log.writeln('File ' + chalk.cyan(f.dest) + ' created.'); | ||
// ...and report some size information. | ||
if (options.report) { | ||
contrib.minMaxInfo(output, result.max, options.report); | ||
} | ||
grunt.log.writeln('File ' + chalk.cyan(f.dest) + ' created: ' + | ||
maxmin(result.max, output, options.report === 'gzip')); | ||
}); | ||
}); | ||
}; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
25809
286
417
1
+ Addedmaxmin@^0.1.0
+ Addedalign-text@0.1.4(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcenter-align@0.1.3(transitive)
+ Addedcliui@2.1.0(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddeep-equal@0.0.0(transitive)
+ Addeddefined@0.0.0(transitive)
+ Addedgzip-size@0.1.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjsonify@0.0.1(transitive)
+ Addedkind-of@3.2.2(transitive)
+ Addedlazy-cache@1.0.4(transitive)
+ Addedlongest@1.0.1(transitive)
+ Addedmaxmin@0.1.0(transitive)
+ Addedpretty-bytes@0.1.2(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedright-align@0.1.3(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedtape@0.2.2(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addeduglify-js@2.8.29(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedyargs@3.10.0(transitive)
+ Addedzlib-browserify@0.0.3(transitive)
- Removedgrunt-lib-contrib@~0.6.1
- Removedamdefine@1.0.1(transitive)
- Removedasync@0.2.10(transitive)
- Removedgrunt-lib-contrib@0.6.1(transitive)
- Removedsource-map@0.1.34(transitive)
- Removeduglify-js@2.4.24(transitive)
- Removedyargs@3.5.4(transitive)
- Removedzlib-browserify@0.0.1(transitive)
Updatedchalk@^0.4.0
Updateduglify-js@^2.4.0