From 67e152cff237150a3a0a7c3458d67624e5755417 Mon Sep 17 00:00:00 2001 From: Hyunbin <47051820+hyunbinseo@users.noreply.github.com> Date: Fri, 15 Dec 2023 17:36:11 +0900 Subject: [PATCH] docs: add sveltekit-2 migration (#11330) --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> --- packages/migrate/README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/migrate/README.md b/packages/migrate/README.md index f93b2873eec0..6235b9c4738b 100644 --- a/packages/migrate/README.md +++ b/packages/migrate/README.md @@ -2,17 +2,27 @@ A CLI for migrating Svelte(Kit) codebases. +Run it using ``` npx svelte-migrate [migration] ``` +Or if you're using `pnpm`: + +``` +pnpm dlx svelte-migrate [migration] +``` + ## Migrations -The available migrations are: +| Migration | From | To | Guide | +| ------------- | --------------------- | --------------------- | --------------------------------------------------------------- | +| `sveltekit-2` | SvelteKit 1.0 | SvelteKit 2.0 | [Website](https://kit.svelte.dev/docs/migrating-to-sveltekit-2) | +| `svelte-4` | Svelte 3 | Svelte 4 | [Website](https://svelte.dev/docs/v4-migration-guide) | +| `package` | `@sveltejs/package@1` | `@sveltejs/package@2` | [#8922](https://github.com/sveltejs/kit/pull/8922) | +| `routes` | SvelteKit pre-1.0 | SvelteKit 1.0 | [#5774](https://github.com/sveltejs/kit/discussions/5774) | -- `routes` - This will update your pre-SvelteKit-1.0 codebase to the SvelteKit 1.0 routes format. The script will automate as much of the conversion as possible, then annotate your codebase with tasks for completion that you can find by searching for `@migration`. Read [the discussion](https://github.com/sveltejs/kit/discussions/5748) for full details. -- `package` - Migration to @sveltejs/package v2. Review the migration guide at [#8922](https://github.com/sveltejs/kit/pull/) and read the updated docs at https://kit.svelte.dev/docs/packaging -- `svelte-4` - This will migrate your codebase from Svelte 3 to Svelte 4 +Some migrations may annotate your codebase with tasks for completion that you can find by searching for `@migration`. ## Changelog