jsdoc2md / jsdoc-parse

parses jsdoc documentation from javascript or html files, outputs JSON
MIT License
99 stars 19 forks source link

Named exports not getting picked up unless I make the following change #24

Closed nathanmarks closed 5 years ago

nathanmarks commented 8 years ago

Without this change, my (commented) named exports don't get picked up: https://github.com/nathanmarks/jsdoc-parse/commit/e6528e09a5f94f5ab98843b7f8f518789a940d5b

Source code: https://gist.github.com/nathanmarks/4005c6c46f3f522a5013a23c2f533839

Markdown output without changes to jsdoc-parse: https://gist.github.com/nathanmarks/917e5634653053cc37260bd254cc2fca

Markdown output with changes to jsdoc-parse: https://gist.github.com/nathanmarks/0a0c5d0c03cb2fcb5541b4af9efde81d

You'll notice that without the changes, the output is missing exports.createStyleManager([options])

75lb commented 8 years ago

hmm, ok.. thanks for the detailed report.. it's a bit late now (UK time) but will look tomorrow.

nathanmarks commented 8 years ago

If I get the chance I'll take a closer look and see if I can rekindle my memory. I'm sure back in January or so when I patched it initially that I had it figured out.

og2t commented 7 years ago

Hi! I've noticed it also fails with the module syntax, i.e.

module.exports = (function() {
  router.route('/')
    /**
     * POST /devices/object
     *
     * @param     {object}    device
     * @param     {string}    name
     *
     */
    .post( function(req, res) {} );

    return router;
})();

will quietly fail :) Is there any way to force the debug?

75lb commented 7 years ago

@og2t Does your example behave as expected using jsdoc? If not, please raise an issue with jsdoc as jsdoc-api, jsdoc-parse etc all sit downstream of that..