Skip to content

Commit

Permalink
Added grunt-version and some configuration for bumping versions from …
Browse files Browse the repository at this point in the history
…the command line.
  • Loading branch information
michaek committed Jul 22, 2013
1 parent 096d49e commit ed567d3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 18 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-version');

// Some boilerplate for grunt version.
// Provides `grunt version:bump:patch` etc.
var versions = {}
grunt.util._.each(['patch', 'minor', 'major'], function(release) {
versions[release] = {
options: {release: release},
src: ['package.json', 'bower.json']
}
});

// Project configuration.
grunt.initConfig({
Expand All @@ -29,7 +40,13 @@ module.exports = function(grunt) {

jshint: {
all: ['Gruntfile.js', '*.json']
}
},

version: grunt.util._.extend(versions, {
options: {
pkg: grunt.file.readJSON('package.json')
}
})

});

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"diff": "~1.0.4",
"grunt-contrib-sass": "~0.3.0",
"bower": "~0.9.2",
"grunt-contrib-jshint": "~0.6.0"
"grunt-contrib-jshint": "~0.6.0",
"grunt-version": "~0.2.2"
}
}

0 comments on commit ed567d3

Please sign in to comment.