1.3.1 • Published 3 years ago

grunt-tocgen v1.3.1

Weekly downloads
62
License
MIT
Repository
github
Last release
3 years ago

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

3 years ago

1.3.0-beta.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago