fivetanley / ember-cli-migrator

migrate your files to the standard ember-cli structure, preserving git history
MIT License
106 stars 22 forks source link

why does the migrator flatten the folder structures? #76

Open mattmarcum opened 9 years ago

mattmarcum commented 9 years ago

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 commented 9 years ago

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 commented 8 years ago

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 commented 8 years ago

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

Techbrunch commented 8 years ago

@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 commented 6 years ago

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