Skip to content

Commit

Permalink
(feat) grunt release task
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeleusin committed May 12, 2014
1 parent d6f75cb commit 02f05f8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
37 changes: 28 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,44 @@ module.exports = function(grunt) {
base : 'src/templates',
module : 'angularChartsTemplates',
rename : function(name) {
return name.replace('.html', '')
return name.replace('.html', '');
}
},
main: {
src: ['src/templates/*.html'],
dest: 'build/templates.js'
},
},
update_json: {
bower: {
src: 'package.json',
dest: 'bower.json',
fields: ['name', 'version', 'description', 'repository']
}
},
copy: {
bower_release_pre: {
files: [
{ src: 'dist/angular-charts.js', dest: 'dist/angular-charts.tmp.js' },
{ src: 'dist/angular-charts.min.js', dest: 'dist/angular-charts.min.tmp.js' }
]
}
},
shell: {
bower_release: {
command: [
'git checkout bower',
'git checkout master -- bower.json',
'mv -f dist/angular-charts.tmp.js dist/angular-charts.js',
'mv -f dist/angular-charts.min.tmp.js dist/angular-charts.min.js',
]
}
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-ngmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html2js');
require('load-grunt-tasks')(grunt);

grunt.registerTask('default', ['ngmin', 'html2js', 'concat', 'uglify', 'clean']);
grunt.registerTask('release', ['default', 'update_json', 'bower_release_pre', 'bower_release']);

};
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "utopia",
"version": "0.1.0",
"name": "angular-charts",
"version": "0.2.2",
"description": "angular directives for common charts using d3, for more information visit",
"main": "Gruntfile.js",
"dependencies": {
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "*",
"grunt-contrib-uglify": "*",
Expand All @@ -12,13 +13,15 @@
"grunt-contrib-clean": "*",
"grunt-html2js": "~0.1.9",
"grunt-ngmin": "0.0.3",
"grunt-contrib-watch": "~0.5.3"
"grunt-contrib-watch": "~0.5.3",
"grunt-update-json": "^0.1.3",
"load-grunt-tasks": "^0.4.0",
"grunt-prompt": "^1.1.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": "",
"repository": "https://github.com/chinmaymk/angular-charts.git",
"author": "chinmaymk",
"license": "MIT"
}

0 comments on commit 02f05f8

Please sign in to comment.