# helper-changelog

> Template helper for generating a markdown-formatted changelog from an object, array or yaml file.

Latest version **0.3.0** (published 2016-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install helper-changelog
pnpm add helper-changelog
yarn add helper-changelog
bun add helper-changelog
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-07-21 |
| First published | 2015-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | changelog, helper, helpers, render, template, templates |

## Links

- npm: https://www.npmjs.com/package/helper-changelog
- Repository: https://github.com/helpers/helper-changelog
- Issues: https://github.com/helpers/helper-changelog/issues
- npm.io page: https://npm.io/package/helper-changelog

## Dependencies (2)

- [extend-shallow](https://npm.io/package/extend-shallow.md) ^2.0.1
- [stringify-changelog](https://npm.io/package/stringify-changelog.md) ^0.2.1

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2016-07-21
- 0.2.0 — 2016-07-21
- 0.1.0 — 2015-03-16

## README

# helper-changelog [![NPM version](https://img.shields.io/npm/v/helper-changelog.svg?style=flat)](https://www.npmjs.com/package/helper-changelog) [![NPM downloads](https://img.shields.io/npm/dm/helper-changelog.svg?style=flat)](https://npmjs.org/package/helper-changelog) [![Build Status](https://img.shields.io/travis/helpers/helper-changelog.svg?style=flat)](https://travis-ci.org/helpers/helper-changelog)

Template helper for generating a markdown-formatted changelog from an object, array or yaml file.

## What is this?

This is a template helper that takes a `changelog` object, array, or filepath to a changelog file, and converts it to a markdown formatted changelog that looks something like this:

```
### [v0.2.0] - 2016-12-26

**fixed**

- Fixed [bug 10,997]

### [v0.1.0] - 2016-12-25

**deprecated**

- Deprecated `.foo` and `.bar`

**changed**

- Changed behavior of `.baz`
```

See [stringify-changelog](https://github.com/jonschlinkert/stringify-changelog) for details.

## Usage

```js
var changelog = require('helper-changelog');
```

## API

```js
<%= changelog(value, locals) %>
```

### Params

* `value` **{String|Object|Array}**: If the value is a string it will be regarded as a filepath. Supported file formats are yaml, json, and markdown.
* `locals`: Locals or options to pass to [stringify-changelog](https://github.com/jonschlinkert/stringify-changelog). If a markdown file is passed, and it follows [keep-a-changelog][] conventions, the helper will attempt to generate [reflinks](#reflinks) to match the headings.

**Note**: When a filepath is passed, the _file name can be anything, but the extension is used for determining how to parse the file_:

```js
// file path to a valid yaml file
<%= changelog("CHANGELOG") %>
<%= changelog("CHANGELOG.yml") %>
<%= changelog("CHANGELOG.yaml") %>

// file path to a valid JSON file
<%= changelog("CHANGELOG.json") %>

// changelog object passed as a variable on the context
<%= changelog(changes) %>

// changelog object passed as locals
<%= changelog({ 
  "v0.1.0": { 
    date: "2016-12-26", 
    changes: [ "Got stuck in another chimney." ] 
  }
}) %>

// changelog array passed as locals
<%= changelog([
  {
    date: "2016-12-26", 
    version: "v0.1.0", 
    changes: [ "Got stuck in another chimney." ]
  }
]) %>
```

**YAML**

The contents of the file must be valid YAML following this format:

```yaml
v0.1.0:
  date: "2016-12-26"
  changes:
    - Got stuck in another chimney.
```

See [stringify-changelog](https://github.com/jonschlinkert/stringify-changelog) for additional options.

## About

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/helpers/helper-changelog/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on July 21, 2016._

---
_Source: https://npm.io/package/helper-changelog · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
