Using grunt-aws-s3 in UW-Madison UIToolkit



Using grunt-aws-s3 in UW-Madison UIToolkit

0 0


grunt-s3-pres

Grunt S3 lightning talk

On Github bshelton229 / grunt-s3-pres

Using grunt-aws-s3 in UW-Madison UIToolkit

Bryan Shelton @bshelton229

https://github.com/UWMadisonUcomm/uw-ui-toolkit

https://github.com/MathieuLoutre/grunt-aws-s3

Tools

grunt-aws-s3

We use grunt-aws-s3 to send built assets to s3 to be made available for users. We build both a current snapshot every time code is pushed, as well as releases.

aws_s3: {
  options: {
    accessKeyId: "<%= conf.get('AWS_ACCESS_KEY_ID') %>",
    secretAccessKey: "<%= conf.get('AWS_SECRET_ACCESS_KEY') %>",
    bucket: "<%= conf.get('BUCKET') || 'uw-ui-toolkit' %>",
    region: 'us-east-1',
    differential: true
  },
  snapshot: {
    files: [
      { cwd: 'dist', src: ['**'], dest: 'snapshot', expand: true },
      { cwd: 'build', src: 'uw-ui-toolkit-snapshot.zip', dest: 'downloads/', expand: true }
    ]
  },
  release: {
    options: {
      differential: false,
      params: {
        CacheControl: 'public, max-age=2000'
      }
    },
    files: [
      { cwd: 'dist', src: ['**'], dest: '<%= pkg.version %>', expand: true },
      { cwd: 'build', src: 'uw-ui-toolkit-<%=pkg.version %>.zip', dest: 'downloads/', expand: true }
    ]
  }
}
					

Bryan Shelton

bshelton229

bryan@sheltonplace.com