jonschlinkert / parse-comments

Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
https://github.com/jonschlinkert
MIT License
66 stars 23 forks source link

module.exports and `@name` #7

Open tunnckoCore opened 8 years ago

tunnckoCore commented 8 years ago

I'm not sure if the issue is for here, but yea... maybe you know better, i dont have time to investigate deeper and just want to mention it

Currently, using some tools like helper-apidocs or the cli apidocs-cli and the following example

/**
 * > Lorem ipsum thingish thing
 *
 * @param  {Number} `one` you should pass `1`
 * @param  {Number} `two` you should pass `2`
 * @return {Number} the `one + two` result
 * @api public
 */
module.exports = function foobar (one, two) {
  return one + two
}

will output

### [.exports](./index.js#L10)

* `one` **{Number}**: you should pass `1`    
* `two` **{Number}**: you should pass `2`    
* `returns` **{Number}**: the `one + two` result  

> Lorem ipsum thingish thing

notice the [.exports], so we need to be [foobar] without adding the @name foobar. And notice the #L10 for which i'm talking in #6.

I can guarantee that these things isn't from my side (from my packages and etc)

jonschlinkert commented 8 years ago

yeah it's a bug. honestly this just needs to be refactored completely. I already started, should be done soon

tunnckoCore commented 8 years ago

honestly this just needs to be refactored completely.

haha, yea.

should be done soon

Great to hear.