@@ -212,6 +212,18 @@ module.exports = function (grunt) {
212212 pushTo : 'origin' ,
213213 updateConfigs : [ 'pkg' ]
214214 }
215+ } ,
216+
217+ conventionalChangelog : {
218+ options : {
219+ changelogOpts : {
220+ // conventional-changelog options go here
221+ preset : 'angular'
222+ }
223+ } ,
224+ release : {
225+ src : 'CHANGELOG.md'
226+ }
215227 }
216228 } ) ;
217229
@@ -228,13 +240,15 @@ module.exports = function (grunt) {
228240 grunt . loadNpmTasks ( 'grunt-bump' ) ;
229241 grunt . loadNpmTasks ( "grunt-contrib-copy" ) ;
230242 grunt . loadNpmTasks ( "grunt-string-replace" ) ;
243+ grunt . loadNpmTasks ( 'grunt-conventional-changelog' ) ;
231244
232245 grunt . registerTask ( "default" , [ "eslint" , "rollup" , "sass" , "connect" , "watch" ] ) ;
233246 grunt . registerTask ( "build" , [ "clean" , "build-emoji" , "eslint" , "rollup" , "sass" , "uglify" , "string-replace" , "postcss" , "copy" ] ) ;
234247 grunt . registerTask ( "build-emoji" , [ "retinafy" , "sprite" , "sass" ] ) ;
235248 grunt . registerTask ( "dist" , [ "clean" , "eslint" , "rollup" , "sass" , "uglify" , "string-replace" , "postcss" , "copy" ] ) ;
249+
236250 grunt . registerTask ( "release" , function ( option ) {
237- grunt . task . run ( [ "bump-only:" + option , "dist" , "changelog " , "bump-commit" ] ) ;
251+ grunt . task . run ( [ "bump-only:" + option , "dist" , "conventionalChangelog " , "bump-commit" ] ) ;
238252 exec ( 'npm publish' , function ( err , stdout , stderr ) {
239253 if ( err ) {
240254 grunt . fatal ( 'Can not publish to NPM:\n ' + stderr ) ;
0 commit comments