Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't automatically add "ext" options as it makes it impossible to keep original filename #91

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# grunt-contrib-compress v0.7.0 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-compress.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-compress)
# grunt-contrib-compress v0.7.1 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-compress.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-compress)

> Compress files and folders.

Expand Down Expand Up @@ -164,4 +164,4 @@ compress: {

Task submitted by [Chris Talkington](http://christalkington.com/)

*This file was generated on Mon Feb 17 2014 14:40:18.*
*This file was generated on Sat Mar 15 2014 13:33:33.*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-contrib-compress",
"description": "Compress files and folders.",
"version": "0.7.0",
"version": "0.8.1",
"homepage": "https://github.com/gruntjs/grunt-contrib-compress",
"author": {
"name": "Grunt Team",
Expand Down
9 changes: 0 additions & 9 deletions tasks/lib/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ module.exports = function(grunt) {
return nextFile();
}

// Append ext if the specified one isnt there
if (typeof filePair.orig.ext === 'undefined') {
var ext = '.' + extension;
// if the chosen ext is different then the dest ext lets use it
if (String(filePair.dest).slice(-ext.length) !== ext) {
filePair.dest += ext;
}
}

// Ensure the dest folder exists
grunt.file.mkdir(path.dirname(filePair.dest));

Expand Down
6 changes: 3 additions & 3 deletions test/compress_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ exports.compress = {
], function(file, next) {
var expected = grunt.file.read(path.join('test', 'fixtures', file));
var actual = '';
fs.createReadStream(path.join('tmp', 'gzip', file + '.gz'))
fs.createReadStream(path.join('tmp', 'gzip', file))
.pipe(zlib.createGunzip())
.on('data', function(buf) {
actual += buf.toString();
Expand Down Expand Up @@ -106,7 +106,7 @@ exports.compress = {
], function(file, next) {
var expected = grunt.file.read(path.join('test', 'fixtures', file));
var actual = '';
fs.createReadStream(path.join('tmp', 'deflate', file + '.deflate'))
fs.createReadStream(path.join('tmp', 'deflate', file))
.pipe(zlib.createInflate())
.on('data', function(buf) {
actual += buf.toString();
Expand All @@ -126,7 +126,7 @@ exports.compress = {
], function(file, next) {
var expected = grunt.file.read(path.join('test', 'fixtures', file));
var actual = '';
fs.createReadStream(path.join('tmp', 'deflateRaw', file + '.deflate'))
fs.createReadStream(path.join('tmp', 'deflateRaw', file))
.pipe(zlib.createInflateRaw())
.on('data', function(buf) {
actual += buf.toString();
Expand Down