-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Doc addition. Any feedback welcome. Text starts below the line.
Migrating from svelte-template
Did you start your project using svelte-template but have decided you need a router? No worries. It's easy to transfer over your project to use Routify instead.
-
Copy over the dependencies and the npm tasks from package.json.
-
Copy over the full content from rollup.config.js
-
Put whatever static assets you had in the
publicfolder into a new folder calledstatic -
Within your
srcfolder, make sure the contents of App.svelte are the following:
<script>
import { Router } from "@sveltech/routify";
import { routes } from "@sveltech/routify/tmp/routes";
</script>
<Router {routes} />
- Within your src folder, create a folder called
pages - Within
pages, create a file calledindex.svelte. This will correspond to/. - Now run
npm ito install the necessary dependencies; and runnpm run devto run Routify's dev server.
Optional
If you are looking to deploy your project to Now or Netlify, look in the scripts folder and copy the files you need.
Metadata
Metadata
Assignees
Labels
No labels