-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUGFIX] Add yuidocs for the addon:init method #6910
[BUGFIX] Add yuidocs for the addon:init method #6910
Conversation
@public | ||
@method init | ||
@param {Project|Addon} parent The project or addon that directly depends on this addon | ||
@param {Project} project The current project (deprecated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add an @example
for this method? I think the this._super()
call should actually include the arguments
too (e.g. like in https://github.com/babel/ember-cli-babel/blob/4ab3d4a0929c6a4c9420a7bd6c15ed24f6d976f6/index.js#L23)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I used argument destructuring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think argument destructuring is not available on Node 4 though, and since we don't run Ember CLI itself through Babel we can't use it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
lib/models/addon.js
Outdated
this._super(parent, project); | ||
this._someCustomSetup(); | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change the example to:
init() {
this._super.init && this._super.init.apply(this, arguments);
this._someCustomSetup();
}
awesome, thanks. could you squash the commits? |
07175a0
to
ec68d39
Compare
squashed |
muchas gracias! @homu r+ |
📌 Commit ec68d39 has been approved by |
…Turbo87 [BUGFIX] Add yuidocs for the addon:init method Addresses [6780](#6780) Just starting the documentation process. Let me know if there's any other relevant info to add in here.
☀️ Test successful - status |
Addresses 6780
Just starting the documentation process. Let me know if there's any other relevant info to add in here.