sveltejs / cli

The Svelte CLI
MIT License
258 stars 11 forks source link

Migrate one component at the time with the CLI #278

Open einarpersson opened 2 weeks ago

einarpersson commented 2 weeks ago

Hi!

In the migration guide the CLI is recommended for migration of a whole app (or folders) - but if you want to migrate one component at the time you are out of luck if you are not using VSCode. This is something that should be available through the CLI, for all svelte users regardless of their editor preference in my opinion.

npx migrate svelte-5 <component.svelte>

benmccann commented 2 weeks ago

As a workaround, you can migrate the whole project, commit the changes to the file you would like to migrate, then revert the rest.

manuel3108 commented 2 weeks ago

Makes sense. @benmccann would you mind moving this to the kit repo, as the migration script still lies there?