项目作者: d2-projects

项目描述 :
?Advanced, colourful front-end integration practice. be inspired by D2Admin :) --- D2 探索版,追求更好的前端工程实践,探索中后台及其以外的更多应用场景
高级语言: Vue
项目地址: git://github.com/d2-projects/d2-advance.git
创建时间: 2019-04-19T15:51:32Z
项目社区:https://github.com/d2-projects/d2-advance

开源协议:MIT License

下载


D2 Advance

last release
ci
last commit

Advanced, colorful front-end integration practice. be inspired by D2Admin 🧗

Preview 👉 https://d2.pub/d2-advance/preview

Public Repositories: Github | 码云 (mirror)

Goal

  • Less is more
  • Dark mode 🌛
  • Responsive 💻 📱
  • Lightweight and faster ⚡️

Integration

Demo

  • Admin src/views/admin: An elegant dashboard (IN PROGRESS)
  • Space src/views/space: An personal workspace (IN PROGRESS)
  • …more. welcome to your issues

Getting Started

Requirements

  • Git
  • NodeJS 12+
  • VSCode (optional, recommended)
  1. # setup
  2. yarn install
  3. # start dev server
  4. yarn serve
  5. # production build
  6. yarn build
  7. # build with `report.html`
  8. yarn build:report
  9. # locally preview production build
  10. yarn preview
  11. # check and auto fix code by eslint
  12. yarn lint
  13. yarn lint --fix
  14. # check type
  15. yarn type
  16. # git commit by commitizen
  17. yarn commit
  18. # take a release commit by standard-version
  19. yarn release
  20. # unit test by jest
  21. yarn test:unit

Custom env variables

type in global.d.ts:

  1. // ...
  2. interface CustomEnvVariables {
  3. VITE_BASE_URL: string;
  4. VITE_HTTP_MOCK?: 'on' | 'off'; // is build with mock
  5. VITE_SOURCE_MAP?: 'on' | 'off'; // is output .map
  6. VITE_GZIP?: 'on' | 'off'; // is output .gz
  7. VITE_BROTLI?: 'on' | 'off'; // is output .br
  8. VITE_API_BASE_URL: string;
  9. // ... more here and start with 'VITE_'
  10. }

default values in .env:

  1. VITE_BASE_URL=./
  2. VITE_HTTP_MOCK=on
  3. VITE_SOURCE_MAP=off
  4. VITE_GZIP=on
  5. VITE_BROTLI=on
  6. VITE_API_BASE_URL=/api

Customize configuration

See Vite Configuration Reference.

License

MIT © CNine