Build your first web project using the Svelte framework and deploy it in the cloud with automated testing and CI/CD
▶What You Will Learn
-Understand why Svelte 3 is the go-to framework for building static web apps that offer great UX
-Explore the tool setup that makes it easier to build and debug Svelte apps
-Scaffold your web project and build apps using the Svelte framework
-Create Svelte components using the Svelte template syntax and its APIs
-Combine Svelte components to build apps that solve complex real-world problems
-Use Svelte's built-in animations and transitions for creating components
-Implement routing for client-side single-page applications (SPAs)
-Perform automated testing and deploy your Svelte apps, using CI/CD when applicable
▶Key Features
-A practical guide to building production-ready static web apps with Svelte 3
-Build faster and leaner frontend and static web apps using the JAMstack
-Deploy your Svelte 3 app to production using cloud services and DevOps principles such as automated testing and CI/CD
▶Who This Book Is For
The book is for frontend or full-stack developers looking to build modern web apps with Svelte. Web developers with experience in leading frontend JavaScript frameworks who wish to learn Svelte will find this book useful. The book assumes a solid understanding of JavaScript and core HTML5 technologies. Basic understanding of modern frontend frameworks will be beneficial, but not necessary.
▶What this book covers
- Chapter 1, Meet Svelte, After covering what modern web development looks like, with concepts such as JAMstack and Single-Page Apps (SPAs), we introduce the Svelte 3 framework and explain how it differs from other popular frameworks like Angular and React: how it can lead to smaller bundles and faster apps. We will also introduce the goal of the book, which is to create a sample app for creating your own journal.
- Chapter 2, Scaffolding Your Svelte Project, Before we dive into building the app, we will go through the steps to install all the required tools, such as Node.js and Visual Studio Code (optional). We will then scaffold the project, create the folder structure, and setup Webpack. Lastly, we will create a "hello world" app with Svelte 3 and run it locally with a development server, to verify that our setup is complete and correct.
- Chapter 3, Building Reactive Svelte Components, In this chapter, we'll start building the Svelte components that our journaling app uses. In the process, we will learn about the syntax used by Svelte templates, and concepts such as binding and events.
- Chapter 4, Putting Your App Together, As we create the last components that our app depends on, we will learn about Svelte stores and transitions. We will then look into other features of the Svelte 3 language and runtime, including a more advanced one.
- Chapter 5, Single-Page Applications with Svelte, In the first part of this chapter, we'll focus on building Single-Page Apps (SPAs) with Svelte 3, including implementing client-side routing (and we'll look at the two main options for doing that, and when to use which). In the second part, we'll briefly look into creating automated tests for our apps using Nightwatch.js. Lastly, we'll add ESLint to the project and configure it to enforce styling conventions.
- Chapter 6, Going to Production, We'll end our journey by bringing the app to production. We'll cover how to serve the app from object storage (Azure Blob Storage) with a CDN in front. We'll also look at pushing our code to GitHub and adding Continuous Integration and Continuous Delivery using GitHub Actions, to automatically build, test, and deploy our app.
- Chapter 7, Looking Forward, This chapter looks at what's next for readers, and how they can progress in their knowledge of developing JAMstack apps with Svelte 3.