-
Notifications
You must be signed in to change notification settings - Fork 3
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
docs: update ember-addon example #15
docs: update ember-addon example #15
Conversation
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.
Seems fine to me.
@rwjblue do you see any issue with recommending validation occur in included
rather than init
?
I think using Maybe instead of replacing, we could add both examples and indicate the pros/cons of each? |
I don't fully understand this @ndekeister-us, can you explain further? As you mentioned, most blueprints will automatically add the required peer dependencies for you; at which point I would expect the validation in |
Ah, I see. The blueprint hasn't been run yet (in the demo), so it hasn't had a chance to install the required peer dependencies. |
I think it's probably possible to know that the blueprint is being ran, and choose not to validate. But I think documenting and using |
Documented the |
Co-authored-by: Robert Jackson <me@rwjblue.com>
Thanks @ndekeister-us! |
Not really important and very specific to ember-addon example, but if we put
validatePeerDependencies
check ininit
method, then we will not be able to generate addon blueprints, the check will fails because peerDependencies will not be foundIt is an unwanted behavior as, most of the time, ember-addon blueprints will automatically install peerDependencies. Putting the check in
included
hook allows blueprints to be run correctly and throws error when building/serving the project if peerDependencies are not foundCurrent behavior with
init
method ->