jenkinz / my-vite-project

Example project using Vue 3 + Vite and TailwindCSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue 3 + Vite (+ Tailwind CSS)

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Recommended IDE Setup

Project Setup

References:

Prerequisites: Install node.js (brew install node)

  1. To setup this project from a clean slate, run the following. If you cloned this project, skip to step 2.

    $ npm init vite my-vite-project
    
    • Select vue as the framework
    • Select variant vue
  2. Install dependencies:

    $ npm install
    
  3. Run the development server:

    $ npm run dev
    
  4. Install Tailwind CSS:

    $ npm install --save-dev tailwindcss postcss autoprefixer
    $ npx tailwindcss init --postcss
    
  5. Install other plugins for development:

    $ npm install --save-dev eslint eslint-plugin-vue
    $ npm install --save-dev eslint-config-prettier
    $ npm install --save-dev eslint-plugin-prettier
    $ npm install --save-dev --save-exact prettier
    $ npm install --save-dev prettier-plugin-tailwindcss
    
  6. To debug from VS Code using Google Chrome:

    • Run npm run dev as usual
    • Open Run and Debug (Cmd+Shift+D) and click "Launch Chrome"
    • Set some breakpoints in .vue files and reload Chrome to hit
  7. Activate pre-commit:

    $ pre-commit install
    

About

Example project using Vue 3 + Vite and TailwindCSS


Languages

Language:Vue 66.0%Language:JavaScript 19.9%Language:CSS 7.3%Language:HTML 6.8%