diff --git a/index.js b/index.js index dc84e3ec..a8f9be09 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ var wrap = require('word-wrap'); // This can be any kind of SystemJS compatible module. -// We use Commonjs here, but ES6 or AMD would do just +// We use Commonjs here, but ES6 or AMD would do just // fine. module.exports = { @@ -11,20 +11,19 @@ module.exports = { // be executed. We pass you cz, which currently // is just an instance of inquirer.js. Using // this you can ask questions and get answers. - // + // // The commit callback should be executed when // you're ready to send back a commit template - // to git. - // + // to git. + // // By default, we'll de-indent your commit // template and will keep empty lines. prompter: function(cz, commit) { - console.log('\nLine 1 will be cropped at 100 characters. All other lines will be wrapped after 100 characters.\n'); - + // Let's ask some questions of the user - // so that we can populate our commit - // template. + // so that we can populate our commit + // template. // // See inquirer.js docs for specifics. // You can also opt to use another input @@ -77,8 +76,8 @@ module.exports = { name: 'footer', message: 'List any breaking changes or issues closed by this change:\n' } - ], function(answers) { - + ]).then(function(answers) { + var maxLineWidth = 100; var wrapOptions = {