Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

注释提取与规范 #166

Open
XYooo opened this issue Jan 17, 2017 · 0 comments
Open

注释提取与规范 #166

XYooo opened this issue Jan 17, 2017 · 0 comments

Comments

@XYooo
Copy link
Member

XYooo commented Jan 17, 2017

一.注释插件使用

根据使用的IDE编辑器不同,列出目前主流的三种sublime、atom和webstorm
(1)sublime:
1.推荐使用插件DocBlockr
注意:在安装DockBlockr插件之前确认安装package control
2.使用方式:敲入“ /** ”之后,回车,自动生成注释如下图:
这里写图片描述
(2)webstorm
1.下载安装完,自动会有注释生成功能,无需添加额外插件
2.使用方式:敲入“ /** ”之后,回车,自动生成注释如下图:
这里写图片描述
(3)atom
1.跟sublime一样,使用插件DocBlockr
2.使用方式:敲入“ /** ”之后,回车,自动生成注释如下图:

(4)JSDoc
使用git安装JSDoc来安装注释提取软件,网址:
JSODoc的安装指导 (https://github.com/jsdoc3/jsdoc)

二.注释的属性值

sublime下的注释内容

(1)函数注释
这里写图片描述
1.[setUserCache description]
第一个是函数名,第二个是描述,自定义
2.@param {[type]} key [description]
@param {[type]} value [description]
type表示类型,key/value参数名,description自定义描述

(2)赋值注释
这里写图片描述
1.[userCode description]
第一个是变量名,第二个是描述,自定义
2.@type{[type]}
type表示类型

webstorm下的注释内容
(1)函数注释
这里写图片描述

三.使用JSDoc抽取出的注释

(1)sublime
这里写图片描述
这里写图片描述
(2)webstorm
这里写图片描述
这里写图片描述

@whizbz11 whizbz11 mentioned this issue Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant