Skip to content
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

fix(build): handle module unification addons #277

Closed

Conversation

buschtoens
Copy link
Contributor

@buschtoens buschtoens commented Nov 15, 2018

I wanted to play around with ember-cli-addon-docs in a Module Unification addon, but hit some problems. This in combination with ember-cli/ember-cli#8197 fixes all problems for me.

The ember-fetch upgrade is required for monorepo addons. I'll rebase this PR, when #284 is merged.

This PR here is also lacking tests for MU.

@buschtoens
Copy link
Contributor Author

So this is working now for classic and MU. However, the story for how to test an addon with classic and MU dummy apps is still shaking out. I guess until then, we can't really write tests for MU.

It would be sweet however, if this PR could be merged nonetheless, as the changes are rather minimal and don't interfere with the classic build pipeline, but would allow early MU adopters to keep experimenting with the mainline release of ember-cli-addon-docs.

@buschtoens
Copy link
Contributor Author

There is one minor issue I noticed: ember-svg-jar icons don't work, but this is most likely an upstream issue. I'll investigate.

@buschtoens buschtoens changed the title [WIP] fix(build): handle module unification addons fix(build): handle module unification addons Nov 19, 2018
@buschtoens
Copy link
Contributor Author

buschtoens commented Nov 20, 2018

The app dir is only partially merged with the MU dummy app, meaning that primarily the docs.api.item route template is not made available out of the box.

The inject-media initializer is executed. The transitions for shift+slash don't seem to work, but they are also broken on master. Try pressing shift+slash here: https://ember-learn.github.io/ember-cli-addon-docs/

@buschtoens
Copy link
Contributor Author

There is one minor issue I noticed: ember-svg-jar icons don't work, but this is most likely an upstream issue. I'll investigate.

I just noticed that it's fixed now. I guess by ember-cli/ember-resolver#276, but I am not 💯 sure, but also don't wanna waste time finding the exact thing that fixed it. 😂

The app dir is only partially merged with the MU dummy app, meaning that primarily the docs.api.item route template is not made available out of the box.

I've relocated the template in d21fa46, so that it may be imported by the consuming dummy app:

// tests/dummy/src/ui/routes/docs/api/item/template.js

export { default } from 'ember-cli-addon-docs/templates/docs/api/item';

By doing it like this, even the nested components {{api/x-component}} keep working.

@buschtoens
Copy link
Contributor Author

Maybe we can do some trickery with Route#templateName to avoid the manual re-export.

@samselikoff
Copy link
Contributor

kind of want to wait until MU is finalized to support this? what does everyone think?

Can always come back to it if/when that stuff ever shakes out

@RobbieTheWagner
Copy link
Member

I've heard from those on Ember core that MU is going through a rethink and will likely differ from the original vision. With that in mind, I am going to close this for now, and we can revisit when things flesh out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants