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

grunt-contrib-compress

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-compress - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

6

docs/compress-options.md

@@ -22,1 +22,7 @@ # Options

*Currently, gzip compression related options are not supported due to deficiencies in node's zlib library.*
## pretty
Type: `Boolean`
Default: `false`
Pretty print file sizes when logging.

5

package.json
{
"name": "grunt-contrib-compress",
"description": "Compress files and folders.",
"version": "0.4.0",
"version": "0.4.1",
"homepage": "https://github.com/gruntjs/grunt-contrib-compress",

@@ -33,3 +33,4 @@ "author": {

"rimraf": "~2.0.2",
"grunt-lib-contrib": "~0.5.1"
"grunt-lib-contrib": "~0.5.1",
"prettysize": "~0.0.2"
},

@@ -36,0 +37,0 @@ "devDependencies": {

11

README.md

@@ -16,3 +16,3 @@ # grunt-contrib-compress [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-contrib-compress.png?branch=master)](http://travis-ci.org/gruntjs/grunt-contrib-compress)

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

@@ -56,2 +56,8 @@ ```js

#### pretty
Type: `Boolean`
Default: `false`
Pretty print file sizes when logging.
### Usage Examples

@@ -78,2 +84,3 @@

* 2013-02-21   v0.4.1   Pretty print compressed sizes. Logging each addition to a compressed file now only happens in verbose mode.
* 2013-02-14   v0.4.0   First official release for Grunt 0.4.0.

@@ -92,2 +99,2 @@ * 2013-01-22   v0.4.0rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.

*This file was generated on Mon Feb 18 2013 08:36:30.*
*This file was generated on Fri Feb 22 2013 09:14:59.*

@@ -15,2 +15,3 @@ /*

var rimraf = require('rimraf');
var prettySize = require('prettysize');

@@ -32,2 +33,9 @@ grunt.registerMultiTask('compress', 'Compress files.', function() {

var pretty = function(size) {
if (!options.pretty) {
return size + ' bytes';
}
return prettySize(size);
};
var archiverOptions = options;

@@ -94,3 +102,3 @@

archiveStream.on('close', function() {
grunt.log.writeln('File ' + archiveFile.cyan + ' created (' + getSize(archiveFile) + ' bytes).');
grunt.log.writeln('File ' + archiveFile.cyan + ' created (' + pretty(getSize(archiveFile)) + ').');
done();

@@ -124,3 +132,3 @@ });

archive.addFile(fs.createReadStream(srcFile), { name: internalFileName }, function(err) {
grunt.log.writeln('Archiving ' + srcFile.cyan + ' -> ' + archiveFile.cyan + '/'.cyan + internalFileName.cyan);
grunt.verbose.writeln('Archiving ' + srcFile.cyan + ' -> ' + archiveFile.cyan + '/'.cyan + internalFileName.cyan);
nextFile(err);

@@ -136,5 +144,5 @@ });

if (shouldGzipTar) {
grunt.log.writeln('Created ' + archiveFile.cyan + ' (' + getSize(archiveFile) + ' bytes)');
grunt.log.writeln('Created ' + archiveFile.cyan + ' (' + pretty(getSize(archiveFile)) + ')');
} else {
grunt.log.writeln('Created ' + archiveFile.cyan + ' (' + written + ' bytes)');
grunt.log.writeln('Created ' + archiveFile.cyan + ' (' + pretty(written) + ')');
}

@@ -178,2 +186,2 @@

};
};
};

Sorry, the diff of this file is not supported yet

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