This repository contains starter Svelte app with Tailwind CSS built using Snowpack within a VSCode devcontainer.
Features
Clone this repo into a folder for your project
git clone https://github.com/patrickneise/svelte-snowpack-tailwind.git <your-project-name>
Change the origin to your project git repo
git remote set-url origin <path-to-your-project git repo>
The .devcontainer
folder contains a devcontainer.json to support the building and configuriation of a development container from the Dockerfile local development of the site. Using VSCode with remote container support removes the need to install/manage dependencies for development on the local development machine, as they are maintained within the container.
Prerequisites:
With VSCode, Docker, and the extension installed:
Remote-Containers: Reopen in Container
The devcontainer.json includes several useful VSCode Extensions to support development.
yarn start
Runs the app in development mode with live reload.
On first run, default browser will open to http://localhost:8080.
yarn build
Builds the app for production to the build
folder.
App will be built and optimized for performance with Snowpack.
Build production container image:
docker build . -t <your/tag>
Run container locally:
docker run -p 8000:80 <your/tag>
App will be available at http://localhost:8000.