Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2016
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = function(grunt) {
  2.  
  3. grunt.loadNpmTasks('grunt-aws-s3');
  4.  
  5.  
  6. grunt.initConfig({
  7.   pkg: grunt.file.readJSON('package.json'),
  8.   s3settings: grunt.file.readJSON('s3settings.json'),
  9.  
  10.   aws_s3: {
  11.     options: {
  12.       accessKeyId: '<%= s3settings.key %>', // Use the variables
  13.       secretAccessKey: '<%= s3settings.secret %>', // You can also use env variables
  14.       region: '<%= s3settings.region %>',
  15.       uploadConcurrency: 5, // 5 simultaneous uploads
  16.       downloadConcurrency: 5 // 5 simultaneous downloads
  17.     },
  18.     live: {
  19.       options: {
  20.         bucket: '<%= s3settings.bucket %>',
  21.         differential: true // Only uploads the files that have changed
  22.       },
  23.       files: [
  24.         {expand: true, cwd: 'deploy/', src: ['**'], dest: ''},
  25.       ]
  26.     },
  27. });
  28.  
  29.   grunt.registerTask('deploy', ['aws_s3:live']);
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement