An open API service indexing awesome lists of open source software.

https://github.com/jonschlinkert/readme-generator

Generate a readme from a template and package.json data. If you need something more comprehensive, I recommend using Verb.
https://github.com/jonschlinkert/readme-generator

generate javascript node nodejs package packagejson readme template templates

Last synced: about 1 month ago
JSON representation

Generate a readme from a template and package.json data. If you need something more comprehensive, I recommend using Verb.

Awesome Lists containing this project

README

        

# readme-generator

> Generate your project's README from package.json data! Uses Lo-Dash/Underscore-style templates. Need something more powerful and pluggable? Try [verb](https://github.com/verbose/verb) instead!

## Install

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i -g readme-generator
```

## CLI

From the command line, run:

```sh
$ readme
$ readme -t # readme template to use
```

## Data

package.json and the parsed `argv` object are used as context for templates.

**Example**

Given the template `Name: <%= foo %>`, the following:

```sh
$ readme --foo bar
```

Would render `Name: bar`

## README.md template

ERB/Lo-dash style templates may be used.

**Examples**

```
<%= name %>
<%= description %>
<%= license %>
<%= Object.keys(dependencies).join(', ') %>
```

Anything that works for Lo-Dash/Underscore templates should work here.

### Custom template

If you add a `.readme.md` to the root of your project it will automatically be used. Or you can specify a custom template to use with the `-t` command.

If `.readme.md` and `-t` are not defined, the [template.md](template.md) in the root of this project will be used.

### Escaping

Sometimes it's necessary to escape templates, like when you're documentation includes examples of templates. You can escape templates by adding an extra `%` in the opening delimiter.

**Example**

```
<%%= foo %>
```

Will render to:

```
<%= foo %>
```

## Running tests

Install dev dependencies:

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

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/readme-generator/issues)

## Author

**Jon Schlinkert**

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

## License

Copyright © 2018 [Jon Schlinkert](https://github.com/jonschlinkert)
Licensed under the MIT license.

***

_This file was generated by [readme-generator](https://github.com/jonschlinkert/readme-generator) on March 31, 2018._