-
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
Addon command and blueprint template #1409
Conversation
merging the app first allows common files in the dummy/app to overwrite the files in the addon's app dir. This is how EmberCLI handles addon file conflicts.
simple initial tests to confirms the addon is working in the consuming app.
Did you not see this? #1374 |
WhoopsI totally missed #1374 I guess I hadn't checked the pull requests in a few days. Not sure how different the two pull requests are but at first glance they seem very similar. Not sure what the merge conflicts are in the other request. |
From what I can tell they are fairly identical, lol. The main difference is that he is using the new EmberAddon constructor rather than the EmberApp one that you are. He's even gone as far as converting his projects to the new structure https://github.com/dockyard/ember-data-route /cc @bcardarella |
I am exploring some changes to my blueprint that are inline with https://gist.github.com/bcardarella/cbf4049484159e6082af I have the code done but am waiting for the core team F2F this weekend to get a final say on direction. |
This pull request adds an addon command to ember cli and a blueprint for generating a default addon directory structure. The addon blueprint is setup to use the new addon API so that it can easily be used by a consuming application.
The addon command works like how you would generate a Rails engine:
ember addon new addon-name
.The addon blueprint uses a similar app structure as Rails engines uses for testing. There is a tests/dummy/app for doing acceptance testing of the addon to mimic how it would be used in a consuming application.
The setup is based heavily on the one used for
ember-cli-super-number
, other than I used a more Rails like directory structure based around how Rails engines are structured. Also by using theapp
directory ember-cli generators work as expected without having to make any changes.