-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default exports #7
Comments
I tried to prevent named things to be tagged twice or more.
In the examples given on MDN:
the only case that would warrant tagging would be the third one but I'm not sure how common it is. The others are not named so they are not interesting. |
Yeah, that makes sense. However, there is the use case where the default export has no other name. For example, there's no reason a module can't just do export default 1; That doesn't actually make sense, but this pattern is really common with Ember applications where you export a import Controller from '@ember/controller';
export default Controller.extend({
// ... stuff
}); Unfortunately they're not "real" classes so the normal Class tagging doesn't help at all. |
Point taken. If you feel like writing basic regexp you are welcome to send a PR otherwise I'll probably tackle the problem this week-end. |
No rush. I also totally understand your reasoning and if you're not interesting in supporting it, that's fine too. Eventually Ember will get ES6 classes and this particular use-case will go away, but in the meantime it's hard to use CTags with an Ember project, even with these improvements. |
Example: export default function foobar() {} Fixes issue romainl#7
@sukima's PR seems to fix this for good. |
Is there a reason that default exports aren't supported by this?
The text was updated successfully, but these errors were encountered: