Miss any of our Open RFC calls?Watch the recordings here! »

grunt-tocgen

1.3.0 • Public • Published

Grunt Tocgen

Grunt enhanced table of contents generator.

Build Status NPM Version Licensen

Installation

npm install grunt-tocgen

Usage

Load the task:

grunt.loadNpmTasks('grunt-tocgen');

Config the task:

grunt.initConfig(
{
    tocgen:
    {
        name:
        {
            src:
            [
                'styles/*.css'
            ],
            options:
            {
                tags:
                {
                    toc: 'tableofcontents',
                    section: 'section'
                },
                indent: ' ',
                newline: '\n'
            }
        }
    }
});

Run the task:

grunt tocgen

Examples

Input file:

/** @section 1. first */
 
/** @section 1.1 sub */
 
/** @section 2. second */

Output file:

/**
 * @tableofcontents
 *
 * 1. first
 *    1.1 sub
 * 2. second
 */
 
/** @section 1. first */
 
/** @section 1.1 sub */
 
/** @section 2. second */

Install

npm i grunt-tocgen

DownloadsWeekly Downloads

17

Version

1.3.0

License

GPL-3.0

Unpacked Size

5.29 kB

Total Files

8

Last publish

Collaborators

  • avatar