1.1.3 • Published 9 years ago

coffdoc v1.1.3

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

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

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago