Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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 */

About

Grunt enhanced table of contents generator

Topics

Resources

Releases

No releases published

Sponsor this project

 

Packages

No packages published
You can’t perform that action at this time.