1.0.2 • Published 3 years ago

chlg-cli v1.0.2

Weekly downloads
220
License
MIT
Repository
github
Last release
3 years ago

chlg-cli

npm Build Status Coverage Status dependencies Status devDependencies Status

Simple command line interface to edit CHANGELOG files according to keepachangelog.com rules.

Command line usage

  • Install chlg-cli (global installation is recommended for command line usage)
$ npm install --global chlg-cli
  • Start using the command line interface
$ chlg init
$ chlg add "New awesome feature"
$ chlg release 1.0.0

For more informations on command line usage, see the documentation.

Tip for NPM scripts

With a combination of this module and NPM scripts, you can automatically add new releases to the change log.

  • First, install chlg-cli as a devDependency
$ npm install --save-dev chlg-cli
  • Then, add this version script to your package.json
{
  ...
  "scripts": {
    ...
    "version": "chlg release $npm_package_version && git add CHANGELOG.md",
    ...
  },
  ...
}

Now, new releases will be added to the change log every time you use the npm version command.

Programmatic usage

  • Install chlg-cli in your project
$ npm install --save-dev chlg-cli
  • Start using the API
'use strict';

var chlg = require('chlg-cli');

chlg.init(function (err) {
  if (err) {
    console.error(err);
  } else {
    console.log('Changelog initialized');
  }
});

Documentation

License

See License