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

ContentEncoding only for .js and .css files? #94

Open
danielschweiger opened this issue Dec 10, 2015 · 1 comment
Open

ContentEncoding only for .js and .css files? #94

danielschweiger opened this issue Dec 10, 2015 · 1 comment

Comments

@danielschweiger
Copy link

hi,

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

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

@MathieuLoutre
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants