ut-tools
Version:
Build and Release management automation package.
67 lines (42 loc) • 2.75 kB
Markdown
> Generate a changelog from git metadata
You most likely only need to use this module if you're building a library that provides an abstraction on top of conventional commits, See [Getting started](https://github.com/conventional-changelog/conventional-changelog#getting-started) if you're an end-user.
```sh
$ npm install --save conventional-changelog
```
```js
var conventionalChangelog = require('conventional-changelog');
conventionalChangelog({
preset: 'angular'
})
.pipe(process.stdout); // or any writable stream
```
Or if you want to use your own custom preset:
```js
var conventionalChangelog = require('conventional-changelog');
var config = require('@org/conventional-changelog-custom-preset');
conventionalChangelog({config})
.pipe(process.stdout); // or any writable stream
```
Returns a readable stream.
See the [conventional-changelog-core](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core) docs. The API is the same with the following changes or additions:
Type: `string` Possible values: `'angular', 'atom', 'codemirror', 'conventionalcommits', 'ember', 'eslint', 'express', 'jquery', 'jshint'`
It's recommended to use a preset so you don't have to define everything yourself. Presets are names of built-in `config`.
A scoped preset package such as `@scope/conventional-changelog-custom-preset` can be used by passing `@scope/custom-preset` to this option.
**NOTE:** `options.config` will be overwritten by the values of preset. You should use either `preset` or `config`, but not both.
MIT
[]: https://badge.fury.io/js/conventional-changelog.svg
[]: https://npmjs.org/package/conventional-changelog
[]: https://travis-ci.org/conventional-changelog/conventional-changelog.svg?branch=master
[]: https://travis-ci.org/conventional-changelog/conventional-changelog
[]: https://david-dm.org/conventional-changelog/conventional-changelog.svg?theme=shields.io
[]: https://david-dm.org/conventional-changelog/conventional-changelog
[]: https://coveralls.io/repos/conventional-changelog/conventional-changelog/badge.svg
[]: https://coveralls.io/r/conventional-changelog/conventional-changelog