• This repository has been archived on 11/Jun/2023
  • Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Grunt task to generate a RESTful API Documentation with apidoc

grunt-apidoc

About

Use Grunt to generate a RESTful API Documentation with apiDoc.

Installation

  1. npm install grunt-apidoc --save-dev
  2. Add grunt.loadNpmTasks('grunt-apidoc'); to Gruntfile.js

Configuration

Add the task to your Gruntfile's grunt.initConfig:

apidoc: {
  myapp: {
    src: "app/",
    dest: "apidoc/"
  }
}

Use only one src and one dest, apiDoc search in subdirs for files with apidoc-parameters.

Additional options

All apiDoc options can be used within options-block, see apidoc -h.

  • src: Source files directory.
  • dest: Destination directory, where the documentation will be created.
  • template: Directory with the template files.
  • options
  • includeFilters: [ ".*\\.js$" ] RegEx, which files to parse.
  • debug: false Show Debug Output.
  • log: true Show Log Output.
  • simulate: false Simulation, no files will be written.

Example options:

includeFilters With includeFilters you can define which files apiDoc should include, default *.js.

debug Show verbose information.

apidoc: {
  myapp: {
    src: "app/",
    dest: "apidoc/",
    options: {
      debug: true,
      includeFilters: [ ".*\\.js$" ],
      excludeFilters: [ "node_modules/" ]
    }
  }
}

Help

Please visit the main apiDoc project page on github for help and information.