svelte-starter-template

Svelte Starter Template

Svelte Starter Template

Starter using Vite + Svelte + TypeScript with opinionated ESLint and Prettier setup.

Motivation

Improve building your faster prototyping by using Vite, TypeScript, Svelte.

This starter uses following libraries:

  • Vite
  • Svelte
  • TypeScript
  • ESLint
  • Prettier

Quick Setup

For complete beginners
  • Install and setup node: It is recommended that you use node through a node version manager.

    • Linux/Mac users can install nvm
    • Windows users can install nvm-windows
    • You can check is node is successfully installed by running node -v in terminal
  • Install yarn: Run the command npm install -g yarn to install yarn

  • Setup project: From the root of the project, run the following command:

    • yarn install: This should install all necessary packages into a node_modules folder.
    • yarn dev: to see if you are able to run the svelte app. If you did not face any errors you are good to go.

Run the following command with <project-folder> with name of destination folder

npx degit MASTERAMARJEET/svelte-starter-template#main <project-folder>

Vite

Vite is a fast frontend build tool. According to the README, it consists of two major parts:

  • A dev server that serves your source files over native ES modules, with rich built-in features and astonishingly fast Hot Module Replacement (HMR).
  • A build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production.

Svelte

Svelte is a radical new approach to building user interfaces.

TypeScript

TypeScript is a superset of JavaScript. It is just one of NPM library, but it provides an original compiler.

ESLint and Prettier

ESLint is use to find and fix problems in your JavaScript code. Prettier is a code formatter.

Top categories

Loading Svelte Themes