Svelte Demo screenshot

Svelte Demo

Author Avatar Theme by Lukeed
Updated: 8 Oct 2021
115 Stars

Multi-page demo built Svelte 3.x and Rollup with code-splitting

Overview

The Svelte Demo is a multi-page application built using Svelte 3.x, Rollup, and code-splitting. It comes with various features and is designed for easy development and deployment.

Features

  • Rollup: The build tool used to bundle the Svelte application.
  • Svelte 3.x: The JavaScript framework used to create reactive components.
  • Live-reload dev server: Automatically reloads the application whenever changes are made in the public directory.
  • Navaid for client-side routing: Enables smooth client-side navigation and routing within the application.
  • Familiar module-context preload() helper: Simplifies the process of loading external modules and resources.
  • TypeScript: Optionally available by switching to the typescript branch for those who prefer static typing.

Installation

To set up and install the Svelte Demo, follow these steps:

  1. Clone the repository from the source.
  2. Navigate to the project directory using a command line interface.
  3. Install the necessary dependencies by running the following command:
npm install
  1. Start the development server by running the command:
npm run dev

This will launch a localhost development server on port 5000 by default. You can modify the port by setting the PORT environment variable. 5. To build the project for production, run the following command:

npm run build

The built assets will be available in the public directory.

Summary

The Svelte Demo is a feature-rich multi-page application built using Svelte 3.x and Rollup. It offers features such as live-reload dev server, client-side routing, and an easy-to-use module-context preload() helper. It also provides the option to use TypeScript for those who prefer static typing. The installation process is straightforward, and the project can be easily set up and built for production.