DEV Community

Cover image for Quick setup Svelte 3 SPA: svelte3-app
Oleksandr Demian
Oleksandr Demian

Posted on • Edited on

4 2

Quick setup Svelte 3 SPA: svelte3-app

Introduction

svelte3-app is an npx command for quick setup of your svelte 3 project.

You don't have to install it locally, but be sure you have at least npm@5.2.0 version installed.

Basic usage

npx svelte3-app
Enter fullscreen mode Exit fullscreen mode

The command above will create a svelte project based on the official template configured with Rollup in the folder you run it within.

It offers some customization for your project. For example, you can decide whenever to use Rollup or Webpack as your bundler or to create a project using Sapper.

Inputs

  • -n -> the name of the project (if empty, the project will be created in the directory it called within, ex: npx svelte3-app -n client)
  • -s -> initialize the project with sapper framework (ex: npx svelte3-app -s, value is not required, but you can pass true right after)
  • -b -> bundler to use (rollup is default, ex: npx svelte3-app -b webpack)

Examples

1) Create a svelte 3 project under svelte-rollup folder configured with rollup:

npx svelte3-app -n svelte-rollup
Enter fullscreen mode Exit fullscreen mode

2) Create a svelte 3 project under svelte-webpack folder configured with webpack:

npx svelte3-app -n svelte-webpack -b webpack
Enter fullscreen mode Exit fullscreen mode

3) Create a svelte 3 project under sapper-rollup folder configured with rollup and sapper:

npx svelte3-app -n sapper-rollup -s
Enter fullscreen mode Exit fullscreen mode

4) Create a svelte 3 project under sapper-webpack folder configured with webpack and sapper:

npx svelte3-app -n sapper-webpack -b webpack -s
Enter fullscreen mode Exit fullscreen mode

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)