Vite 中文文档 Vite 中文文档
指南
GitHub (opens new window)
指南
GitHub (opens new window)
  • vite

    • 指引
    • 为什么选 Vite
    • 开始
    • 功能
    • 命令行界面
    • 使用插件
    • 依赖预构建
    • 静态资源处理
    • 构建生产版本
    • 部署静态站点
    • 环境变量和模式
    • 服务端渲染
    • 后端集成
    • 与其他工具比较
    • 故障排除
    • 从 v3 迁移
  • API

  • 配置参考

  • vite

  • API

  • 配置参考

dashboard


Build Status

A dashboard scaffolding based on Vue.js 3.0 & Vite.


🎉 New dashboard scaffolding


https://github.com/zce/fearless

Features


Modern Vue.js Ecosystem
vue 3.x
vuex 4.x
vue-router 4.x

Fully strongly typed
typescript 4.x

Next generation frontend tooling
vite 2.x

HTTP request based on Fetch API
ky 0.x (not axios)

Customizable UI Library
naive-ui 2.x

Complete engineering workflow
eslint 7.x
husky 7.x
lint-staged 11.x
commitlint 13.x

Locally mocked API server
express 4.x

Authorization
Access token
Refresh token
Auth refresh token
Role based authorization

Modern application deployment
GitHub Actions
Vercel (with Serverless functions)

TODOs


Vite
Migration deps to 3.0
Basic API usage
Compatibility issues
Composition APIs

Features


Type annotation enhancement by JSDoc
Access control by route interception
Vuex (modules, plugins)
API Services
I18n support
Element UI custom theme
Travis CI & GitHub Actions
etc.

Preview


Online demo


https://dashboard.zce.me

username: zce
password: wanglei

P.S. For Chinese: https://zce.gitee.io/vue-admin


Getting Started


Prerequisites


Node.js (>= 10.12, 12.10 preferred)
npm (>= 6.x) or yarn (>= 1.20)
Git (>= 2.20)

Clone & Install


  1. ``` shell
  2. # clone repo
  3. $ git clone https://github.com/zce/dashboard.git
  4. $ cd dashboard
  5. # install dependencies
  6. $ npm install # or yarn
  7. ```

Scaffolding tools


Create an application by zce/caz

  1. ``` shell
  2. # create vue.js apps through this
  3. $ npx caz vue dashboard
  4. # enter generated directory
  5. $ cd dashboard
  6. ```

Available Scripts


  1. ``` shell
  2. # dev with hot reload at http://localhost:3000
  3. $ npm run dev # or yarn dev

  4. # build for production with minification
  5. $ npm run build # or yarn build
  6. ```

Fake API Server


Online service by Vercel: https://dashboard-server.now.sh

Source: zce/dashboard-server


Usage


  1. ``` shell
  2. # clone api server
  3. $ git clone https://github.com/zce/dashboard-server.git

  4. $ cd dashboard-server

  5. # install deps
  6. $ npm install # or yarn

  7. # run api server
  8. $ npm start # or yarn start

  9. # => api server run @ http://localhost:2080
  10. ```

Then modify VUE_APP_API_BASE in .env.development or .env.prodution :

  1. ``` diff
  2. - VUE_APP_API_BASE=https://dashboard-server.now.sh
  3. + VUE_APP_API_BASE=http://localhost:3000
  4. ```

License


MIT © 汪磊 & WEDN.NET
Last Updated: 2023-05-23 11:11:51