Codemod Registry
Explore community-led codemods to migrate, optimize, and transform your codebase.
Ready to contribute?
Build your own codemod and share it with the community.
Explore community-led codemods to migrate, optimize, and transform your codebase.
Build your own codemod and share it with the community.
Explore community-led codemods to migrate, optimize, and transform your codebase.
## Example This codemod adds an empty component TS signature to glimmer components ### Before ```ts export default class MyButtonComponent extends Component { ... } ``` ### After ```ts interface MyButtonSignature { // The arguments accepted by the component Args: {}; // Any blocks yielded by the component Blocks: { default: []; }; // The element to which `...attributes` is applied in the component template Element: null; } export default class MyButtonComponent extends Component<MyButtonSignature> { ... } ```
## Example This codemod adds a glint registry declaration in component files if it's not present already. ### Before ```ts export default class MyComponent extends Component { ... } ``` ### After ```ts export default class MyComponent extends Component { ... } declare module '@glint/environment-ember-loose/registry' { export default interface Registry { 'Path::To::MyComponent': typeof MyComponent; } } ```
## Example This codemod transforms @service decorators to use the correct TypeScript syntax ### Before ```ts @service myService; ``` ### After ```ts import { type Registry as Services } from '@ember/service'; ... @service declare myService: Services['myService']; ```
Build your own codemod and share it with the community.