Minimalist boilerplate designed to be a barebones frontend start to almost any web application, but especially a Single Page Application (SPA) and Progressive Web App (PWA)
If you're building an application in Svelte 3 but Sapper is not suited for your needs, this may save you a few hours to days of development time. See how it looks and behaves at https://svelte-minimal.netlify.app/
npm run build
compiles and moves everything to /public
npm run frontend
opens a local server with hot module replacement (HMR)/static
and any of its subdirectories/src
directory: .svelte
, .ts/.js
, .scss/.css
npm run frontend
will crank up a local server so you can see your changes immediately/RAW
The tech stack uses Typescript, SASS and Webpack by default, but it's not necessary to use them. It will require a bit of work to jettison them though. This section is not a complete guide to doing that, but does have some general advice. If you manage it and want to share how, let me know
To jettison Webpack:
To jettison Typescript:
npx tsc --listEmittedFiles
into the console. The listed files (Likely only main.js
) are the javascript versions of the Typescript files.svelte
files change <script lang="ts">
to <script>
let main: HTMLElement
to let main
)To jettison SASS:
npx sass .src/styles:.src/styles
and delete any .scss
filesMake sure node is installed. Clone from the repository
npm install
then
npm run frontend
npm run build
and now your project is in /public
Some people and resources made this go much more quickly. If you contribute, you also will be listed here!