komet
Write intelligible commit messages, by answering questions
Install
npm install --save-dev komet komet-karma
Configuration
You have a file .commitrc.js
at the root of your project.
This file contains an array of plugins:
moduleexports = 'karma'
How to use
git hook
Withcreate .git/hooks/prepare-commit-msg
#!/bin/sh
# Allow to read user input, assigns stdin to keyboard
exec < /dev/tty
case "$2," in
message,|template,|,)
node_modules/.bin/prepare-commit-msg --path "$1"
;;
*) ;;
esac
Direct use (requires global install)
commit
All args are passed to git commit.
npm run commit
With npm scripts Edit your package.json:
Plugin
questions
are the questions which are going to be asked to create your commit message (it uses Inquirer)
processAnswers
is a function which build and return the commit message.
You can check how works karma
plugin here