Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-contrib-uglify

Package Overview
Dependencies
Maintainers
7
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-uglify - npm Package Compare versions

Comparing version 0.3.3 to 0.4.0

22

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc