Book Image

Svelte 3 Up and Running

By : Alessandro Segala
Book Image

Svelte 3 Up and Running

By: Alessandro Segala

Overview of this book

Svelte is a modern JavaScript framework used to build static web apps that are fast and lean, as well as being fun for developers to use. This book is a concise and practical introduction for those who are new to the Svelte framework which will have you up to speed with building apps quickly, and teach you how to use Svelte 3 to build apps that offer a great app user experience (UX). The book starts with an introduction to Svelte 3, before showing you how to set up your first complete application with the framework. Filled with code samples, each chapter will show you how to write components using the Svelte template syntax and the application programming interfaces (APIs) of the Svelte framework. As you advance, you’ll go from scaffolding your project and tool setup all the way through to production with DevOps principles such as automated testing, continuous integration, and continuous delivery (CI/CD). Finally, you’ll deploy your application in the cloud with object storage services and a content delivery network (CDN) for best-in-class performance for your users. By the end of this book, you’ll have learned how to build and deploy apps using Svelte 3 to solve real-world problems and deliver impressive results.
Table of Contents (9 chapters)

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "After importing all the requisite modules, we define the prod variable, which is true if we're building the application for production, as determined from the NODE_ENV environmental variable."

A block of code is set as follows:

const mode = process.env.NODE_ENV || 'development'
const prod = mode === 'production'

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

AUTH_CLIENT_ID=00000000-0000-0000-0000-000000000000
API_URL=http://localhost:4343
AUTH_JWKS_URL=http://localhost:4343/jwks
AUTH_URL=http://localhost:4343/authorize?client_id={clientId}&response_type=id_token&redirect_uri={appUrl}&scope=openid%20profile&nonce={nonce}&response_mode=fragment
AUTH_ISSUER=http://svelte-poc-server
KEY_STORAGE_PREFIX=svelte-demo

Any command-line input or output is written as follows:

$ NODE_VERSION="v12.18.3"

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "From that page, fetch the Windows Installer (.msi) for the LTS version, selecting the correct architecture of your operating system."

Tips or important notes

Appear like this.