1.1.3 • Published 10 years ago
coffdoc v1.1.3
coffdoc
Rapid generation of CoffeeScript documents.
Demo image

How to use it?
Command line
Install
# bash
npm install -g coffdocQuickly Use
Through all coffee files in the current directory and save the generated documentation to ./doc
# bash
coffdocSwitch
-por--projectPath, default:./if there is only one parameter then you can ignore
-pflag and direct inputcoffdoc folderName-nor--projectName, default:The current directory name-dor--docPath, default:./doc
# bash
coffdoc -p testhello -n "project Hello" -d ./documentationgulp
Install
# bash
npm install coffdoc --save-devUse
# gulpfile.coffee
coffdoc = require 'coffdoc'
gulp.task 'doc', ->
coffdoc
projectPath: './src'
projectName: 'cofdoc'
docPath: './documentation'About comment
You can use the
docblockrplugin to generate a comment block quickly.
Use the internal functions comment
say = (str) ->
###*
* Output some text.
* @param {String} str The string to be displayed
* @return {Boolean} Some boolean value
###
console.log 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
###
say = (str) ->
console.log str
return true
say 'hello'Mulitipe tag
say = (str1, str2) ->
###*
* 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
###
console.log str1, str2
return true
say 'hello'Use markdown in description
say = (str) ->
###*
* Output some `String`, maybe some `Number`,
* Some **else** text.
* @param {String} str The string to be displayed
* @return {Boolean} Some boolean value
###
console.log str
return true
say 'hello'