docs: add details on use of Svelte v2 / Sapper

This commit is contained in:
Nolan Lawson 2022-11-21 07:42:30 -08:00 committed by GitHub
parent 7f86a94414
commit fdec7b2b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,9 +5,17 @@ Basically think of it as a "lay of the land" as well as "weird unusual stuff tha
## Overview ## Overview
Pinafore uses [SvelteJS](https://svelte.technology) and [SapperJS](https://sapper.svelte.technology). Most of it is a fairly typical Svelte/Sapper project, but there Pinafore uses [SvelteJS](https://svelte.technology) v2 and [SapperJS](https://sapper.svelte.technology). Most of it is a fairly typical Svelte/Sapper project, but there
are some quirks, which are described below. This list of quirks is non-exhaustive. are some quirks, which are described below. This list of quirks is non-exhaustive.
## Why Svelte v2 / Sapper ?
There is [no upgrade path from Svelte v2 to v3](https://github.com/sveltejs/svelte/issues/2462). Doing so would require manually migrating every component over. And in the end, it would probably not change the UX (user experience) of Pinafore only the DX (developer experience).
Similarly, [Sapper would need to be migrated to SvelteKit](https://kit.svelte.dev/docs/migrating). Since Pinafore generates static files, there is probably not much benefit in moving from Sapper to SvelteKit.
For this reason, Pinafore has been stuck on Svelte v2 and Sapper for a long time. Migrating it is not something I've considered. The [v2 Svelte docs](https://v2.svelte.dev/) are still online, and share many similarities with Svelte v3.
## Prebuild process ## Prebuild process
The `template.html` is itself templated. The "template template" has some inline scripts, CSS, and SVGs The `template.html` is itself templated. The "template template" has some inline scripts, CSS, and SVGs