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

[Feature] added module-unification route and route-test blueprints #16663

Merged
merged 1 commit into from
May 21, 2018

Conversation

kevinansfield
Copy link
Contributor

@kevinansfield kevinansfield commented May 20, 2018

Part of ember-cli/ember-cli#7530

This PR adds initial support for ember g route foo from a module unification app.

QUESTIONS:

  • I've had to copy the app/router.js file to src/router.js in the tests. Is this approach ok for the moment? I couldn't see a way to get emberNew to generate a MU-style app/addon structure

@kevinansfield kevinansfield force-pushed the mu-route-blueprints branch from 0919638 to f05498c Compare May 20, 2018 15:54
@GavinJoyce
Copy link
Member

GavinJoyce commented May 20, 2018

I couldn't see a way to get emberNew to generate a MU-style app/addon structure

I don't believe that there currently is a way to pass the required environment variables through ember-cli-blueprint-test-helpers so that it generates a MU app or addon. It would be useful to create proper MU apps though, I've added a todo item to ember-cli/ember-cli#7530 - it's likely straight forward to add support for that

I think this approach is fine for now though

let filesDirectory = 'files';

if (isModuleUnificationProject(this.project)) {
filesDirectory = 'module-unification-files';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks likes the content for classic and MU is the same. Perhaps it's possible to use the existing files for both by using appropriate dynamic path parts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 updated

@kevinansfield kevinansfield force-pushed the mu-route-blueprints branch from f05498c to f3c992e Compare May 20, 2018 22:32
Copy link
Member

@GavinJoyce GavinJoyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this is great, thanks @kevinansfield!

@rwjblue rwjblue merged commit 695dc94 into emberjs:master May 21, 2018
@rwjblue
Copy link
Member

rwjblue commented May 21, 2018

Thank you!!

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