coffdoc
CoffeeScript documentation generate
Last updated 4 years ago by tlongzou .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coffdoc 
SYNC missed versions from official npm registry.

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'

Current Tags

  • 1.1.3                                ...           latest (4 years ago)

13 Versions

  • 1.1.3                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.9                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 4
Last Day 0
Last Week 0
Last Month 1
Dependencies (5)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |