Skip to content

Commit

Permalink
docs: add development guide
Browse files Browse the repository at this point in the history
  • Loading branch information
phphe committed Feb 7, 2024
1 parent a2cd8d9 commit 5419e45
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[中文](README_CN.md)

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

## Features

- Supports lists with different item heights.
- Simple and easy to extend, only contains common features.
- Supports common features and is easy to customize. Check [Development](#development).
- Supports lists with fixed height or dynamic height items.
- High performance. For lists with different item heights, it does not retrieve the height of each item.
- 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).

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

## Development

- `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`.
- `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`.
- `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.
- `.github/workflows/build.yml`: Some automated actions performed when publishing to GitHub. You can delete or modify it.

## Changelog

https://github.com/phphe/react-base-virtual-list/releases
13 changes: 10 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[English](README.md)

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

## 特点

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

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

## 开发指南

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

## 更新日志(changelog)

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

0 comments on commit 5419e45

Please sign in to comment.