coffeedoc / codo

CoffeeScript API documentation generator. It's like YARD but for CoffeeScript!
Other
625 stars 92 forks source link

Coerce module.exports #165

Closed pocesar closed 10 years ago

pocesar commented 10 years ago

I don't use the class on my coffeescript, bu rather use ES5Class to generate classes. That means, when I do this:

$deps = {
  _s: require('underscore.string')
  _: require('lodash')
  ES5Class: require('es5class')
  op: require('object-path')
}

module.exports = $deps.ES5Class.$define('Factory', {
    # This class dependencies
    $: $deps

    # Do the class heavy lifting
    #
    # @private
    #
    # @param {Array|String} name Name of the class
    # @param {Function|Object} declaration Object declaration
    # @param {ES5Class} createdClass Existing class
    #
    # @return {ES5Class}
    _apply: (name, declaration, createdClass) ->
       #...
})

Codo isn't able to read the comments inside my class definition. The resulting doc is:


File: factory.coffee
Defined in:     src\system\core
Variables Summary

$deps =

    {
      _s: require('underscore.string'),
      _: require('lodash'),
      ES5Class: require('es5class'),
      op: require('object-path')
    }

Do I need to now use module.exports directly or it's a bug? Maybe for the coercion should exist @class or @constructor like JSDoc

inossidabile commented 10 years ago

Codo is the CoffeScript documenting tool. It only supports CS. CS defines one and only way of class definition. We can not and never will support custom libraries or even core features not related to CS out of box.

pocesar commented 10 years ago

back to JSdoc then =/