Skip to content

A template to quickly scaffold a Vue Static Site built with Vite and styled with Vuetify, deployed to S3

Notifications You must be signed in to change notification settings

JoelYoung01/VueStaticSiteTemplate

Repository files navigation

Vue Static Site Template

This template should help get you started developing with a static Vue 3 web application built with Vite and styled with Vuetify.

Recommended IDE Setup

VSCode + Volar (and disable Vetur).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need Volar to make the TypeScript language service aware of .vue types.

Customize configuration

See Vite Configuration Reference.

Project Setup

Step 1 - Create new Repo

Create a new project in Github. You can either reference this template repo, or create an empty repository and clone this template repo. To clone, follow this process:

git clone [email protected]:JoelYoung01/VueStaticSiteTemplate.git <project_name_here>
cd <project_name_here>
git init
git add .
git commit -m "Initial Commit"
git remote add origin <new_repo_url>
git push -u origin main

Step 2 - Setup Environment

Copy .envtemplate to a new file, .env, and fill out applicable values

Step 3 - Install Dependencies

Install dependencies

pnpm i

Run / Build / Deploy

Compile and Hot-Reload for Development

pnpm dev

Type-Check, Compile and Minify for Production

pnpm build

Lint with ESLint

pnpm lint

S3 Deployment

This repo comes with a GitHub Action that will deploy the site to an S3 bucket. To set this up, you'll need to add the following environment variables and secrets to your GitHub repository:

Environment Variables

  • APP_NAME lower-snake-case
  • APP_TITLE Display Name

Secrets:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • S3_BUCKET

The actions are set up to deploy to 3 environments; dev, stage, and prod. It is recommended to set up S3_BUCKET environment secret per environment.

About

A template to quickly scaffold a Vue Static Site built with Vite and styled with Vuetify, deployed to S3

Resources

Stars

Watchers

Forks