ember-cli-migrator
ember-cli-migrator copied to clipboard
why does the migrator flatten the folder structures?
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?
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
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.
@fivetanley I'm running into the same issue, where should I look to see if I can solve this issue ?
@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.
Ran this once, it appears to be working in preserving folder structure (I'm not to point where have a working migrated ember build)