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 init3、修改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-x644、使用批處理執行安裝,下面是使用的批處理程序:
1 cd /d D:\Ruby200-x64\dev 2 ruby dk.rb install第三步:安裝rdiscount
執行如下批處理程序:
1 gem install rdiscount第四步:安裝jsduck
執行如下批處理程序:
1 gem install jsduckJSDuck教程
官方永遠是最好的學習地方:https://github.com/senchalabs/jsduck/wiki。
備注
寫文檔是個好習慣,當然我也相信好代碼是最好的文檔。
?
轉載于:https://www.cnblogs.com/happyframework/p/3226667.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的Javascript:前端利器 之 JSDuck的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android代码修改系统时间
- 下一篇: svn分支合并到主干(IDEA)