Getting started with grunt (3)

Source: Internet
Author: User

Grunt tutorial 3

Yuidoc plug-in

Yuidoc is a tool that can generate HTML documents by commenting on codes. The documents are generated based entirely on javadoc-style code comment rules.

When writing public modules or APIs, we often output documents to callers. yuidoc is a good assistant at this time.

The following describes how to use yuidoc in grunt.

12345678910111213141516
grunt.initConfig({  pkg: grunt.file.readJSON(‘package.json‘),  yuidoc: {    compile: {      name: ‘<%= pkg.name %>‘,      description: ‘<%= pkg.description %>‘,      version: ‘<%= pkg.version %>‘,      url: ‘<%= pkg.homepage %>‘,      options: {        paths: ‘path/to/source/code/‘,        themedir: ‘path/to/custom/theme/‘,        outdir: ‘where/to/save/docs/‘      }    }  }});

In compile, the first four attributes are easy to understand, including "name", "Description", "version", and "project homepage URL ".

The attributes in options are related to the attributes of yuidoc. They are not limited to three in the sample code. For more attributes, see yuidoc.

Path: path for storing code source files
Themedir: storage path of the generated HTML Style
Outdir: storage path of the generated html doc file

Grunt-contrib-yuidoc

Article foreverpx
Link to the original article: grunt tutorial 3

Getting started with grunt (3)

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.