Skip to content

Commit 98367fc

Browse files
committed
Merge pull request #15 from buschtoens/fix-14-wrong-default-file-pattern
Fix #14: only compress uncompressed files
2 parents 1539a62 + f64a845 commit 98367fc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ For detailed information on how configuration of plugins works, please refer to
5353
### filePattern
5454

5555
Files matching this pattern will be gzipped.
56+
Note: image files such as `.png`, `.jpg` and `.gif` should not be gzipped, as they already are compressed.
5657

57-
*Default:* `'\*\*/\*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}'`
58+
*Default:* `'\*\*/\*.{js,css,json,ico,map,xml,txt,svg,eot,ttf,woff,woff2}'`
5859

5960
### distDir
6061

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
var DeployPlugin = DeployPluginBase.extend({
2121
name: options.name,
2222
defaultConfig: {
23-
filePattern: '**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}',
23+
filePattern: '**/*.{js,css,json,ico,map,xml,txt,svg,eot,ttf,woff,woff2}',
2424
zopfli: false,
2525
keep: false,
2626
distDir: function(context){

0 commit comments

Comments
 (0)