Skip to content

Commit

Permalink
Documented how to migrate the project one component or one route at a…
Browse files Browse the repository at this point in the history
… time
  • Loading branch information
ijlee2 committed Oct 15, 2024
1 parent 4c76c97 commit 05fefeb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,25 @@ pnpm build
./dist/bin/ember-codemod-pod-to-octane.js --root <path/to/your/project>
```
> [!TIP]
>
> You might clone the repo to migrate the project one component or one route at a time. For example, to migrate only the `<NavigationMenu>` component (and its subcomponents, if they exist), update the related file(s) in the `src` folder like this:
>
> ```diff
> export function mapComponentClasses(options: Options): FilePathMapEntries {
> const { podPath, projectRoot } = options;
>
> const podDir = join('app', podPath, 'components');
>
> - const filePaths = findFiles(`${podDir}/**/component.{d.ts,js,ts}`, {
> + const filePaths = findFiles(`${podDir}/navigation-menu/**/component.{d.ts,js,ts}`, {
>
> // ...
> }
> ```
>
> That is, look for `findFiles(`, then insert the component or route name between `podDir` and `**`.
## Compatibility
Expand Down

0 comments on commit 05fefeb

Please sign in to comment.