Grunt getting started (3): grunt getting started

Source: Internet
Author: User

Grunt getting started (3): grunt getting started

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

Author: foreverpx
Link to the original article: Grunt tutorial 3


Tutorial on Level 3 cube

I haven't joined the cube for a long time. Today someone suddenly asked me, so let's talk about it. (My best score is 50 seconds)

Level 1:

The first layer is self-taught. It's easy.

The first and first layers are synchronized.

Layer 2:

Place the entire side down. Then align the middle of the second layer with the first layer to form a small inverted T word. Align the middle of the third layer.

If the front is blue, the left is green, and the right is yellow. At this time, the middle of the second and third layers are blue. The top of the third layer is green.

Use the Left shift formula: top-left-top + Left + TOP + front + top-front-(top, bottom, left, front, and back. + Rotate 90 degrees clockwise.-2 means rotate 180 degrees)

If the front is blue, the left is green, and the right is yellow. At this time, the middle of the second and third layers are blue. The top of the third layer is yellow.

Use the right shift formula: Top + right + top-right-top-front-top + front +

When the front of the second layer appears yellow, the right side is blue on the left side of the second layer.

Shortcut formula: Right + Top 2 right-top + right + Top 2 right-top + front-top-front +

And so on.

Layer 3:

After the second layer is spelled out, there will be four situations on the top (we will then spell the top 10 words ):

1. There is only one top color in the middle. Use the cross formula again. 2 appears.

2. The top surface forms a top surface color. Turn the top surface to turn this line into a vertical line. Use the cross formula again. 3

3. a right angle is formed on the top. One side is facing up, and the other side is facing to the left. Use the cross formula again. 4

4. A "Ten" character (not to mention this case)

Cross formula: Right-up-front-up + front + right +

And then the color (the third layer of the color: the middle of the third layer and the side of the color consistent)

Color-to-color formula: Right-Up-right + up-right-up 2 right + up 2 effect: the color on the top of the left side remains unchanged. The colors in the middle of the other three sides rotate counterclockwise.

Until the four sides are in the same color

After the top cross is spelled out, the three formulas are spelled out on the top:

1. left + right-top-right + TOP + Left-top-right-top + right + effect: the top right corner does not move. from the lower-right corner to the upper-left corner, from the lower-left corner to the upper-left corner, and from the lower-left corner to the lower-right corner

2. Front + right-front + left 2 front-right + front + left 2 front 2 effect: the top right corner does not move. The remaining triangles are shifted clockwise.

3. left + right + Top 2 left-right-back + front + Top 2 rear-front-effect: Hard to say, after six faces are ready, you can use it again (this is also a quick formula)

If you see this article, you can leave a message if you are interested! (If you don't know, send me or leave a message if you have any questions)

What is the difference between the advanced tutorial and the Getting Started tutorial of Level 3 cube?

The primary purpose of the gameplay is to restore the cube, regardless of speed, but with little memory. advanced gameplay is about restoring speed, and also requires a lot of memory formulas. Generally, advanced gameplay CFOP can restore a cube in just over a dozen seconds.

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.