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.
- Host: GitHub
- URL: https://github.com/jonschlinkert/readme-generator
- Owner: jonschlinkert
- License: mit
- Created: 2015-05-26T03:02:03.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-31T18:48:39.000Z (about 7 years ago)
- Last Synced: 2025-04-28T22:50:02.791Z (about 1 month ago)
- Topics: generate, javascript, node, nodejs, package, packagejson, readme, template, templates
- Language: JavaScript
- Homepage: https://github.com/jonschlinkert
- Size: 23.4 KB
- Stars: 19
- Watchers: 5
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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._