Permalink
Browse files

bower setup

  • Loading branch information...
osbornm committed Jul 29, 2015
1 parent f98e359 commit 87bd591d6ccc3a36d3d209d6a2ede9eb61895fd0
Showing with 47 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +26 −0 bower.json
  3. +20 −0 gruntfile.js
View
@@ -4,3 +4,4 @@
npm-debug.log
node_modules
dist
bower_components
View
@@ -0,0 +1,26 @@
{
"name": "uppercut",
"homepage": "https://github.com/osbornm/uppercut",
"authors": [
"Matthew Osborn <http://osbornm.com>"
],
"description": "knockoutjs helper library",
"dependencies": {
"knockoutjs":"~3.3.0"
},
"main": "dist/uppercut.js",
"moduleType": [
"globals"
],
"keywords": [
"knockout"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
View
@@ -49,4 +49,24 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
grunt.registerTask('dist', function() {
// Update the version in bower.json
var bowerConfig = grunt.file.readJSON('bower.json'),
version = grunt.config('pkg.version');
bowerConfig.version = version;
grunt.file.write('bower.json', JSON.stringify(bowerConfig, true, 2));
console.log('To publish, run:');
console.log(' git add bower.json');
console.log(' git add -f ./dist/uppercut.js');
console.log(' git add -f ./dist/uppercut.min.js');
console.log(' git add -f ./dist/uppercut.min.js.map');
console.log(' git checkout head');
console.log(' git commit -m \'Version ' + version + ' for distribution\'');
console.log(' git tag -a v' + version + ' -m \'Add tag v' + version + '\'');
console.log(' git checkout master');
console.log(' git push origin --tags');
});
};

0 comments on commit 87bd591

Please sign in to comment.