Skip to content

Commit

Permalink
Added release task
Browse files Browse the repository at this point in the history
  • Loading branch information
benschwarz committed Apr 16, 2013
1 parent 78d99ce commit e843871
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
26 changes: 26 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/*global module:false*/
module.exports = function(grunt) {

var tilde = require('tilde-expansion'),
s3Credentials;

tilde('~/.gallery-css-s3-credentials', function ( path ) {
s3Credentials = grunt.file.readJSON( path );
}),

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Expand Down Expand Up @@ -57,16 +64,35 @@ module.exports = function(grunt) {
src: 'dist/<%= pkg.name %>.prefixed.css',
dest: 'dist/<%= pkg.name %>.prefixed.min.css'
}
},

s3: {
options: {
key: s3Credentials.key,
secret: s3Credentials.secret,
bucket: 'gallery-css',
access: 'public-read'
},
dist: {
upload: [
{
src: 'dist/*.css',
dest: './'
}
]
}
}
});

// Default task.
grunt.registerTask('default', ['sass', 'rework', 'csslint', 'recess', 'cssmin']);
grunt.registerTask('release', ['default', 's3']);

grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rework');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-s3');
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"grunt-contrib-sass": "0.2.2",
"grunt-contrib-watch": "0.3.1",
"grunt-rework": "0.0.3",
"grunt-recess": "~0.3.1"
"grunt-recess": "~0.3.1",
"grunt-s3": "~0.2.0-alpha",
"tilde-expansion": "0.0.0"
}
}

0 comments on commit e843871

Please sign in to comment.