Skip to content

Instantly share code, notes, and snippets.

@tobek
Created January 10, 2016 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobek/ad6b25f5a0d1c8bdbf8e to your computer and use it in GitHub Desktop.
Save tobek/ad6b25f5a0d1c8bdbf8e to your computer and use it in GitHub Desktop.
basic config for grunt-aws-s3 task
// using https://github.com/MathieuLoutre/grunt-aws-s3
aws_s3: {
options: {
accessKeyId: '<%= aws.key %>',
secretAccessKey: '<%= aws.secret %>',
// putting no region makes it default to US Standard
// debug: true, // do a dry run
uploadConcurrency: 5
},
production: { // run with "aws_s3:production"
options: {
bucket: '<%= aws.bucket %>',
},
files: [{
src: 'dist/**',
dest: '',
rel: 'dist',
params: {
// ContentEncoding: 'gzip', // this task doesn't gzip for you, so only enable this if files are gzipped first
CacheControl: 'public, max-age=86400',
Expires: new Date(Date.now() + 1000*60*60*24)
}
}]
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment