本地开发
项目架构
txt
.
├─ dist // 打包产物
├─ docs // 文档服务
├─ internal // 构建模块
│ ├─ build // 构建库
│ ├─ build-constants // 构建常量库
│ └─ build-utils // 构建工具库
├─ packages // 核心模块
│ ├─ components // 组件库
│ ├─ constants // 常量库
│ ├─ liv-web // 框架库
│ ├─ theme-chalk // 样式库
│ └─ utils // 工具库
├─ play // 演练场
├─ plugins // 插件模块
│ └─ unplugin-liv-web // 自动导入插件
├─ scripts // 脚本
├─ typings // 全局类型定义
├─ package.json
└─ tsconfig.json运行环境
安装依赖
该项目仓库采用monorepo架构,包管理工具推荐使用pnpm。
shell
npm i -g pnpm // 全局安装pnpm
pnpm i // 安装所有依赖包构建插件
本地开发使用到了自动导入等相关插件,你需要提前进行打包构建。
shell
pnpm build:plugins // 构建所有插件启动Play项目
你可以本地启动Play项目,并尝试体验各项组件及功能。
shell
pnpm dev // 本地启动play项目