komet

0.1.4 • Public • Published

komet NPM version

Write intelligible commit messages, by answering questions

Circle ci Status Dependency Status

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:

module.exports = [
  'karma',
]

How to use

With git hook

create .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.

With npm scripts npm run commit

Edit your package.json:

{
    "scripts": {
        "commit": "commit",
    }
}
 

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

Package Sidebar

Install

npm i komet

Weekly Downloads

0

Version

0.1.4

License

ISC

Last publish

Collaborators

  • churpeau