-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Blog post for template-tag-codemod #1345
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ember-blog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
981d7ac
to
d00fd9c
Compare
1733f84
to
a79317f
Compare
- edward-faulkner | ||
date: 2025-02-21T00:00:00.000Z | ||
tags: | ||
- polaris |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- polaris | |
- ember-polaris |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the polaris tag file can be removed
|
||
To make it easier for all teams to adopt Template Tag, we've created `@embroider/template-tag-codemod`. The goal of the codemod is fully-reliable conversion to the new format. | ||
|
||
_Why is this codemod under the `@embroider` namespace?_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be okay to bump this section down below the list of actions to take
|
||
_Why is this codemod under the `@embroider` namespace?_ | ||
|
||
Because Template Tag Codemod is powered by the same backward-compatibility infrastrucutre that we created in Embroider to allow you to adopt modern build tooling. When you build an app with Embroider, Embroider needs to identify, locate, and synthesize import statements for all the components, helpers, and modifiers that you use in your traditional handlebars templates. The Template Tag Codemod does exactly the same thing, except instead of repeating that process every time you do a build, we can do it once-and-for-all and commit the resulting GJS (or GTS for typescript users) files directly into your project. As a result, switching to Template Tag can result in improved build performance for apps that have already adopted Embroider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Template Tag Codemod is powered by the same backward-compatibility infrastrucutre that we created in Embroider to allow you to adopt modern build tooling. When you build an app with Embroider, Embroider needs to identify, locate, and synthesize import statements for all the components, helpers, and modifiers that you use in your traditional handlebars templates. The Template Tag Codemod does exactly the same thing, except instead of repeating that process every time you do a build, we can do it once-and-for-all and commit the resulting GJS (or GTS for typescript users) files directly into your project. As a result, switching to Template Tag can result in improved build performance for apps that have already adopted Embroider. | |
Because Template Tag Codemod is powered by the same backward-compatibility infrastructure that we created in Embroider to allow you to adopt modern build tooling. When you build an app with Embroider, Embroider needs to identify, locate, and synthesize import statements for all the components, helpers, and modifiers that you use in your traditional handlebars templates. The Template Tag Codemod does exactly the same thing, except instead of repeating that process every time you do a build, we can do it once-and-for-all and commit the resulting GJS (or GTS for TypeScript users) files directly into your project. As a result, switching to Template Tag can result in improved build performance for apps that have already adopted Embroider. |
The super-short version of the instructions if you just want to give it a try are: | ||
|
||
1. Make sure you don't have any uncommitted changes, because we're about to start mutating all your files! | ||
2. Run `npx @embroider/template-tag-codemod`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Run `npx @embroider/template-tag-codemod`. | |
2. Run `npx @embroider/template-tag-codemod`. You will likely need to choose flags (documented below) for the best experience for your project. |
--nativeRouteTemplates false --nativeLexicalThis false | ||
``` | ||
|
||
- get output that is more compatible with the classic build system: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this specifically for classic? I'm also seeing local paths not resolving with webpack-based embroider after running the codemod
This creates a new blog post.