JavaScript document generation

Source: Internet
Author: User
JavaScript document generation is a headache, but now there are open-source tools available to use -- jsdoc.
Its official site address: http://jsdoc.sourceforge.net/
Release version is: http://sourceforge.net/projects/jsdoc
Jsdoc is based on JavaScript Code Generate the corresponding help document for the annotation in, which defines a set of annotation label specifications. Therefore, when writing JavaScript code, comment based on the annotation tag that it recognizes.
The usage is as follows:
1. If the operating system is a Windows user, you need to configure the Perl environment. We recommend that you install ActivePerl. Linux/Unix users do not need to configure it.
2. Decompress jsdoc and enter the directory where jsdoc is located in the Command Prompt window. Use the following command to generate a document for JavaScript code.
Perl jsdoc. pl test. js
Test. JS is the JS file used for testing. If it succeeds, the js_docs_out directory is generated under this Directory, which contains the generated documents.
3. If the generation fails, the following error message is generated:
Can't locate html/template. PM in @ INC ......
You need to configure the HTML: Template module:
Go to the Perl Package Manager, run the command ppm, or click the Start menu -- ActivePerl 5.8.8 build 817 -- Perl Package Manager. Run the install command to install the HTML: Template module. The Code is as follows:
C: \> ppm
Ppm> install HTML-template
Ppm> quit

For specific parameters and usage, see the official jsdoc website.

Related Article

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.