3.1.1 • Published 4 months ago

grunt-apidox v3.1.1

Weekly downloads
23
License
MIT
Repository
github
Last release
4 months ago

grunt-apidox    ci Coverage Status NPM version

Grunt plugin to generate Node.js API markdown using apidox.

Example:

grunt.initConfig(
{
    apidox: {
        input: 'index.js',
        output: 'README.md'
    }
});

grunt.loadNpmTasks('grunt-apidox');
grunt.registerTask('docs', 'apidox');

Installation

npm install grunt-apidox

Configuration

Use the apidox property in your Grunt config. You can supply the following options:

  • input (required, string): Source filename to generate documentation for. You can use Grunt globbing patterns to specify more than one file.

  • output (optional, string): Name of the file to write the markdown into. Defaults to the same as the input filename but with the extension changed to .md.

  • outdir (optional, string): Subdirectory to write output file into.

  • inputTitle (optional, string |false): By default, apidox includes a line in the markdown saying it was generated from the input file. Set inputTitle to false to prevent this, or set it to a string to change the text.

  • fullSourceDescription (optional, boolean): By default, apidox includes only the first paragraph of the first comment in the output. Set fullSourceDescription to true to include all of the first comment in the output.

  • sections (optional, object): Use this to divide the table of contents into sections. Each key in sections is the name of the first function in a section. The value is the markdown to insert before the link to the function in the table of contents.

    Use a key with the empty string to insert markdown after the table of contents.

  • extraHeadingLevels (optional, integer): By default, apidox generates level 1 headings for each API entry. Set extraHeadingLevels if you want to change this. For example, to generate level 3 headings, set extraHeadingLevels to 2.

More Examples

Write to a subdirectory:

apidox: {
    input: 'index.js',
    output: 'README.md',
    outdir: 'docs'
}

Set the text of the source link in the markdown to bar:

apidox: {
    input: 'index.js',
    output: 'README.md',
    inputTitle: 'bar'
}

Don't show source link:

apidox: {
    input: 'index.js',
    output: 'README.md',
    inputTitle: false
}

Write to index.md:

apidox: 'index.js'

Use a wildcard to process multiple source files and generate a separate markdown file for each one:

apidox: {
    input: '*.js',
    outdir: 'docs'
}

Use a wildcard to process multiple source files and generate a single markdown file:

apidox: {
    input: '*.js',
    output: 'README.md'
}

Split the table of contents into two sections, foo and bar:

apidox: {
    input: 'index.js',
    sections: {
        someFunction: '##foo',
        someOtherFunction: '##bar'
    }
}

Licence

MIT

Tests

grunt test

Lint

grunt lint

Code Coverage

grunt coverage

c8 results are available here.

Coveralls page is here.

Source: tasks/apidox.js

generated by apidox

3.1.1

4 months ago

3.1.0

6 months ago

3.0.0

1 year ago

2.0.17

2 years ago

2.0.15

2 years ago

2.0.16

2 years ago

2.0.13

3 years ago

2.0.14

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.11

6 years ago

0.1.10

7 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago