{"action":"created","issue":{"url":"https://api.github.com/repos/jsdoc2md/jsdoc-to-markdown/issues/64","labels_url":"https://api.github.com/repos/jsdoc2md/jsdoc-to-markdown/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/jsdoc2md/jsdoc-to-markdown/issues/64/comments","events_url":"https://api.github.com/repos/jsdoc2md/jsdoc-to-markdown/issues/64/events","html_url":"https://github.com/jsdoc2md/jsdoc-to-markdown/issues/64","id":128410891,"number":64,"title":"Issues regarding es6 modules and export syntax","user":{"login":"nathanmarks","id":4420103,"avatar_url":"https://avatars.githubusercontent.com/u/4420103?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanmarks","html_url":"https://github.com/nathanmarks","followers_url":"https://api.github.com/users/nathanmarks/followers","following_url":"https://api.github.com/users/nathanmarks/following{/other_user}","gists_url":"https://api.github.com/users/nathanmarks/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanmarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanmarks/subscriptions","organizations_url":"https://api.github.com/users/nathanmarks/orgs","repos_url":"https://api.github.com/users/nathanmarks/repos","events_url":"https://api.github.com/users/nathanmarks/events{/privacy}","received_events_url":"https://api.github.com/users/nathanmarks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-24T17:06:29Z","updated_at":"2016-01-24T22:20:58Z","closed_at":null,"body":"Hey,\r\n\r\nFYI, I fully understand that some issues are out of your control. But i'd love if you were able to point out where jsdoc causes the issues as you're far more familiar with it than I am.\r\n\r\n**Problem 1 - named exports:** Cannot seem to get named exports to show properly.\r\n\r\nExample code:\r\n```js\r\n\r\n/**\r\n * @module awesomeModule\r\n */\r\n\r\n/**\r\n * Some awesome function\r\n * \r\n * @returns {Promise} resolves to something even awesomer\r\n */\r\nexport function somethingAwesome () { }\r\n```\r\n\r\nThis ends up being displayed in the output as a static member of the module. I tried playing around with more block tags but it still ends up being a member of the module. I went at it with https://github.com/jsdoc2md/jsdoc-parse and saw that the `isExported` flag is not set in the output.\r\n\r\n**Problem 2 - default exports and other module members:** The solution I see for default exports with jsdoc often used involves using `@alias` or even `@module` in the comment block for the exported function/object/whatever. This seems to create problems though if I want to document a default export **and** named exports from one module. I can't seem to cleanly document the exports.\r\n\r\n\r\nThese 2 problems seem somewhat connected -- I can't document my exports in an obvious manner if I'm using named exports.\r\n\r\nThe only type of export I can document cleanly is a default export -- especially if I define the module on the block or alias the export to the module."},"comment":{"url":"https://api.github.com/repos/jsdoc2md/jsdoc-to-markdown/issues/comments/174346880","html_url":"https://github.com/jsdoc2md/jsdoc-to-markdown/issues/64#issuecomment-174346880","issue_url":"https://api.github.com/repos/jsdoc2md/jsdoc-to-markdown/issues/64","id":174346880,"user":{"login":"nathanmarks","id":4420103,"avatar_url":"https://avatars.githubusercontent.com/u/4420103?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanmarks","html_url":"https://github.com/nathanmarks","followers_url":"https://api.github.com/users/nathanmarks/followers","following_url":"https://api.github.com/users/nathanmarks/following{/other_user}","gists_url":"https://api.github.com/users/nathanmarks/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanmarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanmarks/subscriptions","organizations_url":"https://api.github.com/users/nathanmarks/orgs","repos_url":"https://api.github.com/users/nathanmarks/repos","events_url":"https://api.github.com/users/nathanmarks/events{/privacy}","received_events_url":"https://api.github.com/users/nathanmarks/received_events","type":"User","site_admin":false},"created_at":"2016-01-24T22:20:58Z","updated_at":"2016-01-24T22:20:58Z","body":"Adding the following code to `setIsExportedFlag()` in `jsdoc-parse/lib/transform.js` results in it detecting these named exports properly:\r\n\r\n```\r\n  } else if (/^exports\\./.test(identifier.meta.code.name) && identifier.kind !== 'module') {\r\n    identifier.isExported = true\r\n    delete identifier.scope\r\n  }\r\n```\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4420103/12539369/d3a2fd00-c2be-11e5-9495-faa9c24763eb.png)\r\n"}}