Skip to content

Commit 5419e45

Browse files
committed
docs: add development guide
1 parent a2cd8d9 commit 5419e45

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[中文](README_CN.md)
44

5-
React Basic Virtual List. [Online Demo](https://phphe.github.io/react-base-virtual-list/)
5+
React basic virtual list, supports common features and is easy to customize. [Online Demo](https://phphe.github.io/react-base-virtual-list/)
66

77
## Features
88

9-
- Supports lists with different item heights.
10-
- Simple and easy to extend, only contains common features.
9+
- Supports common features and is easy to customize. Check [Development](#development).
10+
- Supports lists with fixed height or dynamic height items.
1111
- High performance. For lists with different item heights, it does not retrieve the height of each item.
1212
- Exported files include TypeScript definition files, CJS files, ES files, IIFE files, and IIFE source maps. The IIFE file can be use by `script` tag in browser, see [IIFE](#iife).
1313

@@ -133,6 +133,13 @@ You can also use the following third-party CDN url to include it.
133133
- unpkg: https://unpkg.com/@phphe/react-base-virtual-list
134134
- jsdelivr: https://cdn.jsdelivr.net/npm/@phphe/react-base-virtual-list
135135

136+
## Development
137+
138+
- `lib`: The main files, also the files that are packaged into the library. Running `npm run build` will package the files in this directory into the `dist` folder. The corresponding Vite configuration file is `vite.build.ts`.
139+
- `src`: The files used for development and debugging. Running `npm run dev` will run the code in this directory in the browser. Running `npm run build:web` will package the code in this directory into the `dist` folder. The corresponding Vite configuration file is `vite.config.ts`.
140+
- `uno.config.ts`: [unocss](https://github.com/unocss/unocss) configuration file. `unocss` only works in the `src` folder. With the current configuration, you can use `Tailwindcss` style class names.
141+
- `.github/workflows/build.yml`: Some automated actions performed when publishing to GitHub. You can delete or modify it.
142+
136143
## Changelog
137144

138145
https://github.com/phphe/react-base-virtual-list/releases

README_CN.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[English](README.md)
44

5-
React 基础虚拟列表。[在线示例](https://phphe.github.io/react-base-virtual-list/)
5+
React 基础虚拟列表,实现了常用功能并且易于二次开发[在线示例](https://phphe.github.io/react-base-virtual-list/)
66

77
## 特点
88

9-
- 支持每项高度不同的列表
10-
- 简单易扩展,只含有常见功能
9+
- 实现了常用功能并且易于二次开发,见[开发指南](#开发指南)
10+
- 支持每项高度固定和不固定的列表
1111
- 高性能。针对每项高度不同的列表,不会获取每项的高度。
1212
- 导出文件包含 typescript 定义文件, cjs 文件,es 文件,iife 文件和 iife source map。iife 文件供浏览器直接调用,见 [iife](#iife).
1313

@@ -133,6 +133,13 @@ interface VirtualListHandle {
133133
- unpkg: https://unpkg.com/@phphe/react-base-virtual-list
134134
- jsdelivr: https://cdn.jsdelivr.net/npm/@phphe/react-base-virtual-list
135135

136+
## 开发指南
137+
138+
- `lib`: 主要文件,也是打包成库的文件。运行`npm run build`会打包其中的文件到`dist`目录。对应 vite 配置文件为: `vite.build.ts`.
139+
- `src`: 开发时调试的文件。运行`npm run dev`会在浏览器中运行其中的代码。运行`npm run build:web`会把其中的代码打包到`dist`目录。对应 vite 配置文件为: `vite.config.ts`.
140+
- `uno.config.ts`: [unocss](https://github.com/unocss/unocss) 配置文件。`unocss`仅在`src`文件夹生效。当前配置下,你可以使用`Tailwindcss`风格的`class`名。
141+
- `.github/workflows/build.yml`: 发布到 github 时自动进行的一些操作。你可以删除或者修改。
142+
136143
## 更新日志(changelog)
137144

138145
https://github.com/phphe/react-base-virtual-list/releases

0 commit comments

Comments
 (0)