Sapper is a framework to build apps with Svelte. Sapper provides a routing system, app stores for data, optimized builds, and many other features to help you get a performant app up and running quickly.
Duration
1 min
Access
Free
Transcript
Available
Sapper is a framework to build apps with Svelte. Sapper provides a routing system, app stores for data, optimized builds, and many other features to help you get a performant app up and running quickly.
Video Transcript
John Lindquist: Use npx to use the degit tool, which can clone and remove the git information from GitHub repos. sveltejs/sapper-template is the repo we're going to grab. We'll type out sveltejs/sapper-template. On this repo, there's also a branch called rollup.
To target that branch, we'll say, "#rollup" and then just name our app sapper-app. That's just the directory where we will clone and remove the git information. Grabbed all of that and dropped it into a sapper-app folder, which we can change into.
You'll see if we list all the files it's a standard Node project with a package.json file. We can npm install the dependencies in there. We can open code inside of this folder to look at those files. We can see all the files listed over here. The index.svelte is open over here. Once we run npm run npm run dev, then it launches the app on localhost:3000.
You can see our app has a home page, an about page, and a blog page. This home page is represented by our index.svelte. We can go ahead and delete stuff. Hit save. Now everything's gone. I just add an h1 that says, "Hello." Hit save. Now we have a giant Hello.