MathieuLoutre / grunt-aws-s3

Grunt plugin to interact with AWS S3 using the AWS SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ContentEncoding only for .js and .css files?

danielschweiger opened this issue · comments

hi,

params: {
    ContentEncoding: 'gzip' // applies to all the files!
  },

is it possible to apply this only to .js and .css files?

You can do something like:

files: [
    {expand: true, cwd: 'dist', src: ['./scripts/*, './styles/*'], dest: 'app/', params: {ContentEncoding: 'gzip'}},
    {expand: true, cwd: 'dist/', src: ['./images/*', './fonts/, etc.*], dest: 'app/'}
  ]

But I'd suggest looking into the gzip option and gzipRename: https://github.com/MathieuLoutre/grunt-aws-s3#gzip