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

Should router.ts also be supported? #165

Closed
Bouke opened this issue Mar 6, 2018 · 8 comments
Closed

Should router.ts also be supported? #165

Bouke opened this issue Mar 6, 2018 · 8 comments
Labels
build Ideas for or bugs with the build process enhancement help wanted

Comments

@Bouke
Copy link
Contributor

Bouke commented Mar 6, 2018

I've changed my router.js into router.ts. However with v2.0.0 of ember-cli-typescript, generating a new route expects router.js to exist. Should router.ts also be supported?

ember generate route account/change-password
installing route
  create app\routes\account\change-password.ts
  create app\templates\account\change-password.hbs
ENOENT: no such file or directory, open '..\app\router.js'
@dfreeman
Copy link
Member

dfreeman commented Mar 6, 2018

We'd need to update the route blueprint to check for router.ts and make changes to ember-router-generator, which uses recast to add a this.route() call. Recast itself just landed initial TS support, but I'm not sure how much effort it's going to be to actually get that up and running (or whether it's even made it into a published release yet).

One option for the short term would be to just avoid throwing an error if we don't find router.js and emit a message instead warning the user that they'll need to update router.ts by hand.

@championswimmer
Copy link

One option for the short term would be to just avoid throwing an error if we don't find router.js and emit a message instead warning the user that they'll need to update router.ts by hand.

sounds like a good thing to do for now

@chriskrycho
Copy link
Member

@championswimmer if we don't get somewhere in the next bit, yep; but I know @jamescdavis actually has a spike where he's gotten a good part of the way through it, so I'm waiting to hear on that (and a lot of us were at EmberConf and had travel to/from/after this week).

@chriskrycho chriskrycho added enhancement help wanted build Ideas for or bugs with the build process labels Jul 6, 2018
@raido
Copy link

raido commented Apr 14, 2020

Any updates on this?

@chriskrycho
Copy link
Member

Thanks for checking! No progress at the moment (or for the last very many moments!) but hopefully relatively soon. Supporting this dovetails with a couple other things I’m hoping to tackle in the next few months!

@knownasilya
Copy link

Just ran into this too

@mertenhanisch
Copy link

Making a router.ts possible would be great. Any news?

@chriskrycho
Copy link
Member

This got implemented natively via ember-cli/ember-cli#9972! Huzzah!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Ideas for or bugs with the build process enhancement help wanted
Projects
None yet
Development

No branches or pull requests

7 participants