UNPKG

721 BJavaScriptView Raw
1
2module.exports = function(grunt) {
3 grunt.initConfig({
4 pkgFile: 'package.json',
5 'npm-contributors': {
6 options: {
7 commitMessage: 'chore: update contributors'
8 }
9 },
10 bump: {
11 options: {
12 commitMessage: 'chore: release v%VERSION%',
13 pushTo: 'origin'
14 }
15 },
16 'auto-release': {
17 options: {
18 checkTravisBuild: false
19 }
20 }
21 });
22 grunt.loadNpmTasks('grunt-npm');
23 grunt.loadNpmTasks('grunt-bump');
24 grunt.loadNpmTasks('grunt-auto-release');
25 return grunt.registerTask('release', 'Bump the version and publish to NPM.', function(type) {
26 return grunt.task.run(['npm-contributors', "bump:" + (type || 'patch'), 'npm-publish']);
27 });
28};