-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use AST transforms for adding new routes and resources + path option #2748
Use AST transforms for adding new routes and resources + path option #2748
Conversation
7cd03ac
to
8eddc20
Compare
This uses the following micro lib https://github.com/abuiles/ember-router-generator, we still need support for deletions. A full list of scenarios can be seen in the following test file https://github.com/abuiles/ember-router-generator/blob/master/tests/generator-test.js
8eddc20
to
690b164
Compare
+1, this is the right tool for the job. |
I suspect the appveyor failure is unrelated, so this seems good to go. Someone will need to fix those failures soon, maybe i'll have time tonight. |
Use AST transforms for adding new routes and resources + path option
<3 |
👍 |
Can't wait until this is released, a real pain to manually fix the map each time |
This uses the following micro lib
https://github.com/abuiles/ember-router-generator, we still need
support for deletions.
A full list of scenarios can be seen in the following test file
https://github.com/abuiles/ember-router-generator/blob/master/tests/generator-test.js
Instead of using esprima + escodegen I went with https://github.com/benjamn/recast which seems more estable and offers a nicer support for printing code, also works the ES6 features we are using.
I also added the path option so we can now do
ember g route friends/edit --path=:friend_id/edit
orember g route account --path=my/account
The following gif shows the new generator in action:
refs: #2729 closes #2724