Skip to content
Permalink
Browse files

Added an S3 deployment plugin which pushesh to the code asset store.

  • Loading branch information...
SirRawlins committed Nov 7, 2013
1 parent 4ecc836 commit 3c73016a0d5a9d93a68fde7fe8c09d101bcf9dca
Showing with 33 additions and 3 deletions.
  1. +2 −1 .gitignore
  2. +29 −1 Gruntfile.js
  3. +2 −1 package.json
@@ -1,4 +1,5 @@
.DS_Store
/tmp
/node_modules
npm-debug.log
npm-debug.log
aws.json
@@ -4,6 +4,7 @@ module.exports = function(grunt) {
grunt.initConfig({
// Default package configuration.
pkg: grunt.file.readJSON('package.json'),
aws: grunt.file.readJSON('aws.json'),

// Javascript validation.
jshint: {
@@ -31,7 +32,32 @@ module.exports = function(grunt) {
options: {
npmtag: false // Don't deploy to NPM as we don't want to release like that.
}
}
},

// Deployment.
s3: {
options: {
key: '<%= aws.key %>',
secret: '<%= aws.secret %>',
bucket: 'code.sorryapp.com',
region: 'eu-west-1',
access: 'public-read',
},
dev: {
upload: [
{
src: 'dist/<%= pkg.name %>.min.js',
dest: '<%= pkg.name %>/<%= pkg.version %>/<%= pkg.name %>.min.js',
options: { gzip: true }
},
{
src: 'dist/<%= pkg.name %>.min.css',
dest: '<%= pkg.name %>/<%= pkg.version %>/<%= pkg.name %>.min.css',
options: { gzip: true }
}
]
}
}
});

// Load the plugin that provides the "uglify" task.
@@ -42,6 +68,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
// Release tasks to manage version number bump, tag etc.
grunt.loadNpmTasks('grunt-release');
// AWS/S3 deployment tools.
grunt.loadNpmTasks('grunt-s3');

// Default task(s).
grunt.registerTask('default', ['jshint', 'uglify', 'cssmin']);
@@ -12,6 +12,7 @@
"grunt-contrib-uglify": "~0.2.5",
"grunt-contrib-jshint": "~0.7.1",
"grunt-release": "~0.6.0",
"grunt-contrib-cssmin": "~0.7.0"
"grunt-contrib-cssmin": "~0.7.0",
"grunt-s3": "~0.2.0-alpha.3"
}
}

0 comments on commit 3c73016

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.