3 Star 20 Fork 9

D2Projects / D2Advance

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.md 3.87 KB
一键复制 编辑 原始数据 按行查看 历史
CNine 提交于 2021-03-17 18:43 . docs: wording

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)
# setup
yarn install

# start dev server
yarn serve

# production build
yarn build

# build with `report.html`
yarn build:report

# locally preview production build
yarn preview

# check and auto fix code by eslint
yarn lint
yarn lint --fix

# check type
yarn type

# git commit by commitizen
yarn commit

# take a release commit by standard-version
yarn release

# unit test by jest
yarn test:unit

Custom env variables

type in global.d.ts:

// ...
interface CustomEnvVariables {
  VITE_BASE_URL: string;
  VITE_HTTP_MOCK?: 'on' | 'off'; // is build with mock
  VITE_SOURCE_MAP?: 'on' | 'off'; // is output .map
  VITE_GZIP?: 'on' | 'off'; // is output .gz
  VITE_BROTLI?: 'on' | 'off'; // is output .br

  VITE_API_BASE_URL: string;
  // ... more here and start with 'VITE_'
}

default values in .env:

VITE_BASE_URL=./
VITE_HTTP_MOCK=on
VITE_SOURCE_MAP=off
VITE_GZIP=on
VITE_BROTLI=on

VITE_API_BASE_URL=/api

Customize configuration

See Vite Configuration Reference.

License

MIT © CNine

1
https://gitee.com/d2-projects/d2-advance.git
git@gitee.com:d2-projects/d2-advance.git
d2-projects
d2-advance
D2Advance
master

搜索帮助