Skip to content

Commit

Permalink
fix(prompter): resolve issue with new inquirer api (commitizen#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Westland authored and jimthedev committed Apr 21, 2016
1 parent 7659b95 commit 807b4e5
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions index.js
Expand Up @@ -3,28 +3,27 @@
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 = {

// When a user runs `git cz`, prompter will
// 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
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 807b4e5

Please sign in to comment.