grunt-readme
Version:
Grunt plugin for generating a README from templates, including an optional table of contents. No Gruntfile config is necessary, just choose a starter template and you'll be ready to go.
123 lines (110 loc) • 2.95 kB
Markdown
```js
/**!
* grunt-readme
* http://github.com/assemble/grunt-readme
* Partially derived from and inspired by grunt-contrib-internal
*
* Copyright (c) 2013, Jon Schlinkert, contributors
* Licensed under the MIT license.
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L1-8)
```js
/**
* options.metadata
* @type {Object}
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L53-56)
```js
/**
* meta: {}
* Root context object passed to templates with a value of "this"
* @type {Object}
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L60-64)
```js
/**
* Convenience variables.
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L73-75)
```js
/**
* Templates directory.
* If `options: { templates: '' }` is not defined, then the task will use the
* templates directory in the `./templates` directory of the grunt-readme task.
* @type {String}
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L85-90)
```js
/**
* Docs directory
* The location where all of your docs will be stored
* This defaults to './docs' in the root of your project.
* @example:
* options: {
* docs: 'foo/'
* }
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L99-107)
```js
/**
* README template used to create README.md. Unless a template
* is defined in the task options, a start template from
* grunt-readme will be used.
*
* @example:
* options: {
* readme: './foo/README.tmpl.md'
* }
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L119-128)
```js
/**
* TRAVIS
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L181-183)
```js
/**
* CHANGELOG
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L191-193)
```js
/**
* CONTRIBUTING.md
* Copy contributing guide from templates.
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L201-204)
```js
/**
* AUTHORS
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L212-214)
```js
/**
* Generate a Table of Contents
* @usage:
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L225-228)
```js
/**
* Generalized template configuration
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L232-234)
```js
/**
* Generate README
*/
```
[View Source Code](https://github.com/assemble/grunt-readme/tasks/readme.js#L241-243)