Skip to content

WJ-Yuan/vue-ssr-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥Vue SSR Template

A vue ssr template created by vite

📚 Specification

core

express typescript vue-router pinia vue-i18n

css

sass unocss

lint

eslint prettier

🏠 Project Framework

root
  |
  |_ e2e # for e2e test
  |_ env # for environment variables
    |
    |_ .env # common env
    |_ .env.dev # development env
    |_ .env.prod # production env
  |_ public # public assets
  |_ src # main src
    |
    |_ @types # typescript .d.ts file
    |_ api # axios api request
    |_ composables # common vue hooks
    |_ components # common components
    |_ constants # common constants
    |_ router # vue-router config
    |_ store # pinia
    |_ utils # common utils
    |_ views # fe page
  |_ ...
  |_ Dockerfile # for build docker image
  |_ .eslintrc.cjs # eslint config
  |_ .prettierrc.json # prettier config
  |_ index.html # root html
  |_ playwright.config.ts # playwright config for e2e test
  |_ server.js # ssr server root
  |_ vite.config.ts # vite config
  |_ vitest.config.ts # vitest config for unit test

⌨️ Development

# npm
npm run dev

# yarn
yarn dev

# pnpm
pnpm dev

lint

# type-check
npm run type-check

# lint
npm run lint

# format
npm run format

🌐 Production

build

npm run build

preview

# for local preview
npm run server

production

You can run project in docker or remote server by pm2.

🛠️ Test

# unit test
npm run test:unit

# e2e test
npm playwright install # prerequisite before first test
npm run test:e2e

👍 Vscode Extension Recommend