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

why does the migrator flatten the folder structures? #76

Open
mattmarcum opened this issue Oct 20, 2015 · 5 comments
Open

why does the migrator flatten the folder structures? #76

mattmarcum opened this issue Oct 20, 2015 · 5 comments

Comments

@mattmarcum
Copy link

After migrating an old ember-rails project all my nicely nested routes ended up at the top level app/routes folder, but with dasherized names from the old file paths. What's the purpose of that? I've been using folders to keep my other ember-cli apps nicely organized, seems to work just fine. Is there a way to turn this feature off and keep my folder structure?

@mattmarcum
Copy link
Author

Just realized that while my routes and controllers get their paths flattened and converted to long filenames, my templates do not. So controllers/some/path/foo.js gets converted to controllers/some-path-foo.js but my templates just get moved over to templates/some/path/foo.hbs

@fivetanley
Copy link
Owner

This definitely seems like a bug. We should consider the file path when renaming. Our algorithm has evolved over time; initially it would just look at the content of the file and generate names based off that. HBS don't use that algorithm because there's nothing to go off of, so we use the file name. We should allow JS files to opt in to a mixed algorithm.

@Techbrunch
Copy link

Techbrunch commented Aug 19, 2016

@fivetanley I'm running into the same issue, where should I look to see if I can solve this issue ?

@Techbrunch
Copy link

Techbrunch commented Aug 31, 2016

@fivetanley I managed to solve my problem by updating the filePathForClassname function in typed-export.js.

Could you take a look at the pull request and tell me how I can improve it. Thanks.

@hefox
Copy link

hefox commented Jan 16, 2018

Ran this once, it appears to be working in preserving folder structure (I'm not to point where have a working migrated ember build)

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

No branches or pull requests

4 participants