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

[FEATURE] Add a --route-authoring-format option to the route generator #20835

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Windvis
Copy link
Contributor

@Windvis Windvis commented Jan 23, 2025

Now that #20800 is merged, it would also be nice if we could generate new routes with a .gjs / .gts template already.

ember g route foo --route-authoring-format=strict

or the shorthand:

ember g route foo --strict

or as the project's default by adding routeAuthoringFormat: 'strict' in .ember-cli

@NullVoxPopuli
Copy link
Contributor

I've added this to the agenda for us to discuss a name on tuesday. thanks for working on this!!!

@Windvis Windvis force-pushed the strict-route-templates-blueprint-support branch from 9a0a990 to 975bd95 Compare March 1, 2025 10:35
@Windvis Windvis changed the title Add a new --strict-template option to the route generator Add a new --strict-route-template option to the route generator Mar 1, 2025
@Windvis Windvis mentioned this pull request Mar 1, 2025
3 tasks
Windvis added 2 commits March 4, 2025 20:23
ember-cli is used in the tests, and some tests need the newer features to work as expected.
We also need a version that uses the `babel-remove-types` package that includes the fixes for .gts detyping to work.

Because of this update, some slight adjustments are needed to some pod related tests. The `usePods` option of ember-cli-blueprint-test-helpers' `setupPodConfig` util isn't compatible with newer ember-cli versions. As a workaround we use the `--pod` argument when generating files.
This allows users to generate .gjs/.gts templates instead of .hbs templates.
@Windvis Windvis force-pushed the strict-route-templates-blueprint-support branch from 975bd95 to 770cc30 Compare March 4, 2025 19:24
@Windvis Windvis changed the title Add a new --strict-route-template option to the route generator Add a new --route-authoring-format option to the route generator Mar 4, 2025
@Windvis Windvis changed the title Add a new --route-authoring-format option to the route generator Add a --route-authoring-format option to the route generator Mar 4, 2025
@Windvis Windvis changed the title Add a --route-authoring-format option to the route generator [FEATURE] Add a --route-authoring-format option to the route generator Mar 4, 2025
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

Successfully merging this pull request may close these issues.

2 participants