All Projects → PacktPublishing → Svelte-3-Up-and-Running

PacktPublishing / Svelte-3-Up-and-Running

Licence: other
No description, website, or topics provided.

Programming Languages

javascript
184084 projects - #8 most used programming language
Svelte
593 projects
go
31211 projects - #10 most used programming language
HTML
75241 projects
shell
77523 projects
CSS
56736 projects
Dockerfile
14818 projects

Svelte 3 Up and Running

Svelte 3 Up and Running

This is the code repository for Svelte 3 Up and Running, published by Packt.

A practical guide to building production-ready static web apps with Svelte 3

What is this book about?

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).

This book covers the following exciting features:

  • 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

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

if (test expression)
{
  Statement upon condition is true
}

API server

Throughout the book, you'll be building a sample Journaling application with Svelte 3 that runs within a web browser. Like most front-end applications, the sample app comes with a back-end API server that is used to authenticate users and offer persistent storage for the data.

Pre-compiled binaries

The easiest way to launch the API server is to download a pre-compiled binary for your platform. Pre-compiled binaries are available in this GitHub repository in the Releases section.

After downloading the archive for your platform and uncompressing it, launch the API server by double-clicking on the executable file. You should see the application running in a terminal window. You'll then be able to connect to the API server by opening http://localhost:4343 in your browser. To terminate the API server, close the terminal window.

Note for macOS users:

The pre-compiled binary is not signed with an Apple developer certificate, and Gatekeeper will refuse to run it in newer versions of macOS. If this happens to you, you will notice an error saying that the app is coming from an unidentified developer.

To run the application on macOS you can either (temporarily) disable Gatekeeper and allow unsigned applications (see the Apple Support page) or run this command:

xattr -rc path/to/application

(where path/to/application is the location of the downloaded binary).

Run with Docker

If you have Docker installed on your development machine, you can run the API server with:

docker run --rm -p 4343:4343 \
    -v ~/data:/data \
    italypaleale/sveltebook

Where ~/data is the path on your local machine where the API server will store persistent data.

Source code

Source code for the API server (written in Go) is present in the api-server directory, and instructions to run from source are in that folder's README file.

Book's sample code

In the ch* folders, you can find the sample code for each chapter of the book.

Following is what you need for this book: 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.

With the following software and hardware list you can run all code files present in the book (Chapter 1-7).

Software and Hardware List

Chapter Software required OS required
1 to 7 Node.js 10 or higher with NPM Windows, macOS, and Linux (Any)
6 Microsoft Azure subscription or free trial Windows, macOS, and Linux (Any)
6 GitHub Account Windows, macOS, and Linux (Any)

Related products

Get to Know the Author

Alessandro Segala is a Product Manager at Microsoft working on developer tools. He has over a decade of experience building full-stack web applications, having worked as a professional developer as well as contributing to multiple open source projects. Alessandro is the maintainer of svelte-spa-router, one of the most popular client-side routers for Svelte 3.

Suggestions and Feedback

Click here if you have any feedback or suggestions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].