Introduction and use of Apidoc

Source: Internet
Author: User
Tags html page json regular expression
GitHub Apidoc Demo

Apidoc Display Effect
Getting Started Preface

All the examples in this document use the Javadoc style (which can be used in C #, Weiqi, Dart, Java and JavaScript, PHP, typing and all other Javadoc languages):

/**
 * This is a comment.
 */

Use your own unique multiline comment code for other languages:

The Coffeescript

# # # is
a comment.
###

Elixir

@apidoc "" This is
a comment. "" "

Erlang (% within the comment is optional)

%{
% This is a comment.
%}

Perl (Doxygen)

#**
# is a comment.
#*

Python

"" "This is
a comment." "" "

Ruby

=begin This is
a comment.
=end
installation
NPM Install Apidoc-g
Run
Apidoc-i myapp/-o apidoc/-t mytemplate/

Create Apidoc myapp/for all files in the directory, use mytemplate/from the catalog template, and apidoc/all output directories.

Without any parameters, Apidoc generates all documents. cs. Dart. Erl. Go java. js. php. py. ts file, in the current directory (including subdirectories) and output write./doc/. Command Line Interface

Show Command line arguments:

Apidoc-h

Important Parameters:

Parameters Description
-f,--file Filter Regular expression filtering to select files that should be parsed (multiple-F can be used). By default.. cs. Dart. Erl. Go. java. js. php. py. RB. ts,

Example (resolve only and a. js file named. TS):
Apidoc-f ". *\\.js$"-F ". *\\.ts$"
-i,--input Input/source directory name: The location of your project files

Example:
Apidoc-i myapp/
-o,--output The output directory name. Where the location is placed to generate the document.

For example:
Apidoc-o apidoc/
-t,--template Use the template output file. You can create and use your own templates.

For example:
Apidoc-t mytemplate/
Gollum Module

A separate module grunt support, please visit github.com/apidoc/grunt-apidoc
or install via NPM:

NPM Install Grunt-apidoc--save-dev
Templates

Apidoc includes using the default template handlebar, bootstrap, Requirejs and jquery generated output api_data.js and api_project.js as an HTML page.

The default build Apidoc uses a complex template with its supported version: View comparison of different versions of the API: views of changes between the two versions of your API

View the default demo to create your own

You can create your own templates and use Apidoc generated files Api_data.js,api_project.js or only JSON files Api_data.json,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.