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

执行如下批处理程序:

1 gem install rdiscount

第四步:安装jsduck

执行如下批处理程序:

1 gem install jsduck

JSDuck教程

官方永远是最好的学习地方:https://github.com/senchalabs/jsduck/wiki

备注

写文档是个好习惯,当然我也相信好代码是最好的文档。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值