coffdoc
Rapid generation of CoffeeScript documents.
Demo image
How to use it?
Command line
Install
# bash npm install -g coffdoc
Quickly Use
Through all coffee files in the current directory and save the generated documentation to ./doc
# bash coffdoc
Switch
-
-p
or--projectPath
, default:./
if there is only one parameter then you can ignore
-p
flag and direct inputcoffdoc folderName
-
-n
or--projectName
, default:The current directory name
-
-d
or--docPath
, default:./doc
# bash coffdoc -p testhello -n "project Hello" -d ./documentation
gulp
Install
# bash npm install coffdoc --save-dev
Use
# gulpfile.coffee coffdoc = require 'coffdoc' gulptask 'doc'-> coffdoc projectPath: './src' projectName: 'cofdoc' docPath: './documentation'
About comment
You can use the
docblockr
plugin to generate a comment block quickly.
Use the internal functions comment
= ###* * Output some text. * @param {String} str The string to be displayed * @return {Boolean} Some boolean value ### consolelog str return true say 'hello'
You can also use the function outside comments (low priority)
###* * Output some text. * @param {String} str The string to be displayed * @return {Boolean} Some boolean value###= consolelog str return true say 'hello'
Mulitipe tag
= ###* * Output some text. * @param {String} str1 The string to be displayed * @param {Number} str2 The number to be displayed, if you wanna Wrap, * then you need maintaining consistent indentation. * @return {Boolean} Some boolean value ### consolelog str1str2 return true say 'hello'
Use markdown in description
= ###* * Output some `String`, maybe some `Number`, * Some **else** text. * @param {String} str The string to be displayed * @return {Boolean} Some boolean value ### consolelog str return true say 'hello'