{"action":"created","issue":{"url":"https://api.github.com/repos/estools/escodegen/issues/228","labels_url":"https://api.github.com/repos/estools/escodegen/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/estools/escodegen/issues/228/comments","events_url":"https://api.github.com/repos/estools/escodegen/issues/228/events","html_url":"https://github.com/estools/escodegen/issues/228","id":68438603,"number":228,"title":"ExportDefaultDeclaration ","user":{"login":"xjamundx","id":246143,"avatar_url":"https://avatars.githubusercontent.com/u/246143?v=3","gravatar_id":"","url":"https://api.github.com/users/xjamundx","html_url":"https://github.com/xjamundx","followers_url":"https://api.github.com/users/xjamundx/followers","following_url":"https://api.github.com/users/xjamundx/following{/other_user}","gists_url":"https://api.github.com/users/xjamundx/gists{/gist_id}","starred_url":"https://api.github.com/users/xjamundx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjamundx/subscriptions","organizations_url":"https://api.github.com/users/xjamundx/orgs","repos_url":"https://api.github.com/users/xjamundx/repos","events_url":"https://api.github.com/users/xjamundx/events{/privacy}","received_events_url":"https://api.github.com/users/xjamundx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Constellation","id":9023,"avatar_url":"https://avatars.githubusercontent.com/u/9023?v=3","gravatar_id":"","url":"https://api.github.com/users/Constellation","html_url":"https://github.com/Constellation","followers_url":"https://api.github.com/users/Constellation/followers","following_url":"https://api.github.com/users/Constellation/following{/other_user}","gists_url":"https://api.github.com/users/Constellation/gists{/gist_id}","starred_url":"https://api.github.com/users/Constellation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Constellation/subscriptions","organizations_url":"https://api.github.com/users/Constellation/orgs","repos_url":"https://api.github.com/users/Constellation/repos","events_url":"https://api.github.com/users/Constellation/events{/privacy}","received_events_url":"https://api.github.com/users/Constellation/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-04-14T16:43:59Z","updated_at":"2015-04-14T17:24:06Z","closed_at":null,"body":"It seems this project uses `ExportDeclaration` for both `export` and `export default`. As far as I can tell most projects (including espree, estree, and estraverse) are now using `ExportDefaultDeclaration` for these nodes, but `escodegen` is complaining with the following when I try to use it:\r\n\r\n```\r\nTypeError: Object #<CodeGenerator> has no method 'ExportDefaultDeclaration'\r\n    at CodeGenerator.generateExpression (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:2408:28)\r\n    at CodeGenerator.Statement.ExpressionStatement (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:1313:28)\r\n    at CodeGenerator.generateStatement (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:2421:33)\r\n    at CodeGenerator.Statement.Program (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:1695:43)\r\n    at CodeGenerator.generateStatement (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:2421:33)\r\n    at generateInternal (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:2442:28)\r\n    at Object.generate (/Users/jamuferguson/dev/5to6/node_modules/escodegen/escodegen.js:2510:18)\r\n```\r\n\r\nThis hacky code will actually unblock the common use case...\r\nhttps://github.com/xjamundx/escodegen/blob/export-default/escodegen.js#L1268\r\n```js\r\nExportDefaultDeclaration: function (stmt, flags) {\r\n    stmt.default = true;\r\n    return this.ExportDeclaration(stmt, flags);\r\n},\r\n```\r\n\r\nSee also: https://github.com/estree/estree/blob/master/es6.md#exportdefaultdeclaration\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/estools/escodegen/issues/comments/92988528","html_url":"https://github.com/estools/escodegen/issues/228#issuecomment-92988528","issue_url":"https://api.github.com/repos/estools/escodegen/issues/228","id":92988528,"user":{"login":"xjamundx","id":246143,"avatar_url":"https://avatars.githubusercontent.com/u/246143?v=3","gravatar_id":"","url":"https://api.github.com/users/xjamundx","html_url":"https://github.com/xjamundx","followers_url":"https://api.github.com/users/xjamundx/followers","following_url":"https://api.github.com/users/xjamundx/following{/other_user}","gists_url":"https://api.github.com/users/xjamundx/gists{/gist_id}","starred_url":"https://api.github.com/users/xjamundx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjamundx/subscriptions","organizations_url":"https://api.github.com/users/xjamundx/orgs","repos_url":"https://api.github.com/users/xjamundx/repos","events_url":"https://api.github.com/users/xjamundx/events{/privacy}","received_events_url":"https://api.github.com/users/xjamundx/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T17:24:06Z","updated_at":"2015-04-14T17:24:06Z","body":"I have a few other nitpicky things. I'll file separate issues if you like but for now I'll just add them here, so as not to spam your repo :)\r\n\r\n"}}