grunt-contrib-compress
Advanced tools
Comparing version 0.4.3 to 0.4.4
# Usage Examples | ||
```js | ||
// make a zipfile | ||
compress: { | ||
@@ -18,1 +19,16 @@ main: { | ||
``` | ||
```js | ||
// gzip assets 1-to-1 for production | ||
compress: { | ||
main: { | ||
options: { | ||
mode: 'gzip' | ||
}, | ||
expand: true, | ||
cwd: 'assets/', | ||
src: ['**/*'], | ||
dest: 'public/' | ||
} | ||
} | ||
``` |
{ | ||
"name": "grunt-contrib-compress", | ||
"description": "Compress files and folders.", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-compress", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -64,2 +64,3 @@ # grunt-contrib-compress [](http://travis-ci.org/gruntjs/grunt-contrib-compress) | ||
```js | ||
// make a zipfile | ||
compress: { | ||
@@ -80,5 +81,20 @@ main: { | ||
```js | ||
// gzip assets 1-to-1 for production | ||
compress: { | ||
main: { | ||
options: { | ||
mode: 'gzip' | ||
}, | ||
expand: true, | ||
cwd: 'assets/', | ||
src: ['**/*'], | ||
dest: 'public/' | ||
} | ||
} | ||
``` | ||
## Release History | ||
* 2013-03-18 v0.4.4 Fixes for Node.js v0.10. Explicitly call grunt.file methods with map and filter. | ||
* 2013-03-13 v0.4.3 Fix for gzip; continue iteration on returning early. | ||
@@ -100,2 +116,2 @@ * 2013-03-12 v0.4.2 Refactor task like other contrib tasks. Fix gzip of multiple files. Remove unused dependencies. | ||
*This file was generated on Thu Mar 14 2013 12:11:12.* | ||
*This file was generated on Tue Mar 19 2013 10:17:48.* |
@@ -26,3 +26,7 @@ /* | ||
grunt.util.async.forEachSeries(files, function(file, next) { | ||
var src = file.src.filter(grunt.file.isFile).map(grunt.file.read).join(''); | ||
var src = file.src.filter(function(f) { | ||
return grunt.file.isFile(f); | ||
}).map(function(f) { | ||
return grunt.file.read(f); | ||
}).join(''); | ||
if (src.length < 1) { return next(); } | ||
@@ -83,3 +87,5 @@ | ||
var isExpandedPair = file.orig.expand || false; | ||
var src = file.src.filter(grunt.file.isFile); | ||
var src = file.src.filter(function(f) { | ||
return grunt.file.isFile(f); | ||
}); | ||
@@ -86,0 +92,0 @@ grunt.util.async.forEachSeries(src, function(srcFile, nextFile) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31475
278
115