Javascript:前端利器 之 JSDuck

Javascript:前端利器 之 JSDuck

背景

文档的重要性不言而喻,对于像Javascript这种的动态语言来说就更重要了,目前流行的JDoc工具挺多的,最好的当属JSDuck,可是JSDuck在Windows下的安装非常麻烦,这里就写下来做个备忘。

JSDuck生成的文档效果

JSDuck安装步骤

第一步:安装Ruby

Ruby下载地址:http://rubyinstaller.org/downloads/

我是64位操作系统,下载的文件如下:

第二步:安装Development Kit

1、将DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe解压到指定目录,下图是我解压后的位置:

2、使用批处理程序生成config.yml,下面是使用的批处理程序:

1 cd /d D:\Ruby200-x64\dev
2 ruby dk.rb init

3、修改config.yml的内容:

复制代码
 1 # This configuration file contains the absolute path locations of all
 2 # installed Rubies to be enhanced to work with the DevKit. This config
 3 # file is generated by the 'ruby dk.rb init' step and may be modified
 4 # before running the 'ruby dk.rb install' step. To include any installed
 5 # Rubies that were not automagically discovered, simply add a line below
 6 # the triple hyphens with the absolute path to the Ruby root directory.
 7 #
 8 # Example:
 9 #
10 # ---
11 # - C:/ruby19trunk
12 # - C:/ruby192dev
13 #
14 ---
15 - D:\Ruby200-x64
复制代码

4、使用批处理执行安装,下面是使用的批处理程序:

1 cd /d D:\Ruby200-x64\dev
2 ruby dk.rb install

第三步:安装rdiscount

执行如下批处理程序:

扫描二维码关注公众号,回复: 3785199 查看本文章
1 gem install rdiscount

第四步:安装jsduck

执行如下批处理程序:

1 gem install jsduck

JSDuck教程

猜你喜欢

转载自blog.csdn.net/su513292239/article/details/51733209