coffdoc

    1.1.3 • Public • Published

    coffdoc

    Rapid generation of CoffeeScript documents.

    Demo image demo

    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 input coffdoc 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'
     
    gulp.task '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

    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 str1str2
        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'

    Install

    npm i coffdoc

    DownloadsWeekly Downloads

    2

    Version

    1.1.3

    License

    MIT

    Last publish

    Collaborators

    • tlongzou