Skip to content

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

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

Open
wants to merge 1 commit 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

Current status

Ready to review!

@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 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
@kategengler
Copy link
Member

I'm 👍 but this will need rebasing after #20862 lands

@NullVoxPopuli
Copy link
Contributor

there are no conflicts -- why rebase? 🤔

@kategengler
Copy link
Member

@NullVoxPopuli
CleanShot 2025-04-29 at 11 33 59@2x

@Windvis
Copy link
Contributor Author

Windvis commented Apr 29, 2025

Yea, there are indeed conflicts, and there are also some other things I need to adjust (.gts tests, more types, ...). I need to find some time to look into it again.

@Windvis Windvis force-pushed the strict-route-templates-blueprint-support branch from 770cc30 to 379832d Compare April 29, 2025 15:56
Copy link

github-actions bot commented Apr 29, 2025

Development Assets

Diff

Details

This PRmain
Dev
 2.2M └─┬ .
1015K   ├─┬ @ember
 205K   │ ├─┬ -internals
  69K   │ │ ├─┬ views
  64K   │ │ │ └─┬ lib
  23K   │ │ │   ├── mixins
  22K   │ │ │   ├── system
  10K   │ │ │   ├── views
 4.3K   │ │ │   └── compat
  35K   │ │ ├─┬ runtime
  30K   │ │ │ └─┬ lib
  21K   │ │ │   ├── mixins
 5.7K   │ │ │   └── ext
  26K   │ │ ├─┬ meta
  21K   │ │ │ └── lib
  11K   │ │ ├── owner
 9.4K   │ │ ├── deprecations
 7.4K   │ │ ├── metal
 7.0K   │ │ ├── string
 5.1K   │ │ ├── glimmer
 4.9K   │ │ ├── utils
 4.9K   │ │ ├── routing
 4.5K   │ │ ├── error-handling
 4.5K   │ │ ├── utility-types
 4.2K   │ │ ├── container
 4.2K   │ │ ├── browser-environment
 4.1K   │ │ └── environment
 183K   │ ├─┬ routing
  28K   │ │ └── lib
 149K   │ ├─┬ object
  66K   │ │ └─┬ lib
  62K   │ │   └── computed
 114K   │ ├─┬ template-compiler
 109K   │ │ └─┬ lib
  20K   │ │   ├── plugins
 4.6K   │ │   ├── system
 4.1K   │ │   └── -internal
  66K   │ ├─┬ application
 5.6K   │ │ └── lib
  52K   │ ├─┬ debug
  21K   │ │ └── lib
  38K   │ ├─┬ array
 4.9K   │ │ └── lib
  31K   │ ├─┬ engine
 4.7K   │ │ └── lib
  27K   │ ├── runloop
  22K   │ ├─┬ utils
  18K   │ │ └── lib
  20K   │ ├── helper
  11K   │ ├── destroyable
 9.8K   │ ├── instrumentation
 9.4K   │ ├── controller
 7.4K   │ ├── service
 7.2K   │ ├── owner
 6.2K   │ ├── component
 5.6K   │ ├── canary-features
 5.5K   │ ├── modifier
 5.1K   │ ├── template-compilation
 5.0K   │ ├── enumerable
 5.0K   │ ├── test
 4.4K   │ ├── template
 4.4K   │ ├── renderer
 4.2K   │ ├── deprecated-features
 4.1K   │ ├── template-factory
 4.1K   │ └── version
 709K   ├── shared-chunks
 384K   ├─┬ @glimmer
 166K   │ ├── runtime
  60K   │ ├── opcode-compiler
  30K   │ ├── manager
  22K   │ ├── validator
  14K   │ ├── program
  12K   │ ├── reference
  11K   │ ├── destroyable
  10K   │ ├─┬ tracking
 4.4K   │ │ └── primitives
  10K   │ ├── util
 8.1K   │ ├── node
 7.3K   │ ├── global-context
 6.4K   │ ├── wire-format
 5.0K   │ ├── vm
 4.9K   │ ├── encoder
 4.6K   │ ├── owner
 4.1K   │ └── env
  60K   ├─┬ ember-testing
  56K   │ └─┬ lib
  14K   │   ├── test
  14K   │   ├── helpers
  10K   │   ├── ext
 6.5K   │   └── adapters
  31K   ├── backburner.js
  25K   ├── ember
  24K   ├── route-recognizer
  18K   ├─┬ @simple-dom
  14K   │ └── document
 9.2K   ├── dag-map
 4.3K   ├── rsvp
 4.3K   └── router_js
 2.2M └─┬ .
1015K   ├─┬ @ember
 205K   │ ├─┬ -internals
  69K   │ │ ├─┬ views
  64K   │ │ │ └─┬ lib
  23K   │ │ │   ├── mixins
  22K   │ │ │   ├── system
  10K   │ │ │   ├── views
 4.3K   │ │ │   └── compat
  35K   │ │ ├─┬ runtime
  30K   │ │ │ └─┬ lib
  21K   │ │ │   ├── mixins
 5.7K   │ │ │   └── ext
  26K   │ │ ├─┬ meta
  21K   │ │ │ └── lib
  11K   │ │ ├── owner
 9.4K   │ │ ├── deprecations
 7.4K   │ │ ├── metal
 7.0K   │ │ ├── string
 5.1K   │ │ ├── glimmer
 4.9K   │ │ ├── utils
 4.9K   │ │ ├── routing
 4.5K   │ │ ├── error-handling
 4.5K   │ │ ├── utility-types
 4.2K   │ │ ├── container
 4.2K   │ │ ├── browser-environment
 4.1K   │ │ └── environment
 183K   │ ├─┬ routing
  28K   │ │ └── lib
 149K   │ ├─┬ object
  66K   │ │ └─┬ lib
  62K   │ │   └── computed
 114K   │ ├─┬ template-compiler
 109K   │ │ └─┬ lib
  20K   │ │   ├── plugins
 4.6K   │ │   ├── system
 4.1K   │ │   └── -internal
  66K   │ ├─┬ application
 5.6K   │ │ └── lib
  52K   │ ├─┬ debug
  21K   │ │ └── lib
  38K   │ ├─┬ array
 4.9K   │ │ └── lib
  31K   │ ├─┬ engine
 4.7K   │ │ └── lib
  27K   │ ├── runloop
  22K   │ ├─┬ utils
  18K   │ │ └── lib
  20K   │ ├── helper
  11K   │ ├── destroyable
 9.8K   │ ├── instrumentation
 9.4K   │ ├── controller
 7.4K   │ ├── service
 7.2K   │ ├── owner
 6.2K   │ ├── component
 5.6K   │ ├── canary-features
 5.5K   │ ├── modifier
 5.1K   │ ├── template-compilation
 5.0K   │ ├── enumerable
 5.0K   │ ├── test
 4.4K   │ ├── template
 4.4K   │ ├── renderer
 4.2K   │ ├── deprecated-features
 4.1K   │ ├── template-factory
 4.1K   │ └── version
 709K   ├── shared-chunks
 384K   ├─┬ @glimmer
 166K   │ ├── runtime
  60K   │ ├── opcode-compiler
  30K   │ ├── manager
  22K   │ ├── validator
  14K   │ ├── program
  12K   │ ├── reference
  11K   │ ├── destroyable
  10K   │ ├─┬ tracking
 4.4K   │ │ └── primitives
  10K   │ ├── util
 8.1K   │ ├── node
 7.3K   │ ├── global-context
 6.4K   │ ├── wire-format
 5.0K   │ ├── vm
 4.9K   │ ├── encoder
 4.6K   │ ├── owner
 4.1K   │ └── env
  60K   ├─┬ ember-testing
  56K   │ └─┬ lib
  14K   │   ├── test
  14K   │   ├── helpers
  10K   │   ├── ext
 6.5K   │   └── adapters
  31K   ├── backburner.js
  25K   ├── ember
  24K   ├── route-recognizer
  18K   ├─┬ @simple-dom
  14K   │ └── document
 9.2K   ├── dag-map
 4.3K   ├── rsvp
 4.3K   └── router_js

@Windvis Windvis force-pushed the strict-route-templates-blueprint-support branch 2 times, most recently from 4fcdd2a to 93e5e9a Compare April 29, 2025 18:34
Comment on lines +6 to +7
model: unknown;
controller: unknown;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I matched what the template-tag codemod outputs.

This allows users to generate .gjs/.gts templates instead of .hbs templates.
@Windvis Windvis force-pushed the strict-route-templates-blueprint-support branch from 93e5e9a to d38d1a7 Compare April 29, 2025 18:40
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.

3 participants