From f64a845a8cc66b459d0e7fae6e49b39d25e58080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Buscht=C3=B6ns?= Date: Mon, 21 Dec 2015 04:20:29 +0100 Subject: [PATCH] fix #14: only compress uncompressed files --- README.md | 3 ++- index.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9eaccff..ead7e44 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,9 @@ For detailed information on how configuration of plugins works, please refer to ### filePattern Files matching this pattern will be gzipped. +Note: image files such as `.png`, `.jpg` and `.gif` should not be gzipped, as they already are compressed. -*Default:* `'\*\*/\*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}'` +*Default:* `'\*\*/\*.{js,css,json,ico,map,xml,txt,svg,eot,ttf,woff,woff2}'` ### distDir diff --git a/index.js b/index.js index c72c435..0283c7a 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ module.exports = { var DeployPlugin = DeployPluginBase.extend({ name: options.name, defaultConfig: { - filePattern: '**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}', + filePattern: '**/*.{js,css,json,ico,map,xml,txt,svg,eot,ttf,woff,woff2}', zopfli: false, keep: false, distDir: function(context){