Skip to content

Commit

Permalink
docs: 更新迁移文档
Browse files Browse the repository at this point in the history
  • Loading branch information
wjgogogo committed Nov 21, 2024
1 parent 95bede0 commit 17e3587
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 6 deletions.
36 changes: 36 additions & 0 deletions s2-site/docs/common/install.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### Using the Basic Version <Badge>@antv/s2</Badge>

> Install using npm or yarn or pnpm
```bash
# npm
$ npm install @antv/s2 --save

# yarn
$ yarn add @antv/s2

# pnpm
$ pnpm add @antv/s2
```

### Using the React Version <Badge>@antv/s2-react</Badge>

```bash
npm install @antv/s2 @antv/s2-react --save
```

### Using React Analysis Components <Badge>@antv/s2-react-components</Badge>

```bash
npm install @antv/s2 @antv/s2-react-components antd @ant-design/icons --save
```

### Using Vue3 Version <Badge type="success">@antv/s2-vue</Badge> <Badge type="error">Maintenance Discontinued</Badge>

:::warning{title="Note"}
`@antv/s2-vue` has been discontinued. Due to limited resources and considering factors such as maintenance costs and package download volume, updates will no longer be provided after version `2.0.0`. Please create your own wrapper based on `@antv/s2`, or fork the repository to develop a community version.
:::

```bash
npm install @antv/s2 @antv/s2-vue [email protected] --save
```
1 change: 1 addition & 0 deletions s2-site/docs/common/install.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ npm install @antv/s2 @antv/s2-react-components antd @ant-design/icons --save

```bash
npm install @antv/s2 @antv/s2-vue [email protected] --save
```
51 changes: 47 additions & 4 deletions s2-site/docs/common/packages.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,52 @@ title: Packages
order: 5
---

| Package | Latest | Size | Download |
| -------- | ------ | ---------- | ------ |
| [@antv/s2](https://github.com/antvis/S2/tree/next/packages/s2-core) | ![latest](https://img.shields.io/npm/v/@antv/s2/latest.svg?logo=npm) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2.svg?logo=npm) |
:::info{title="Note"}

There are three ways to create an `S2` table: the basic version `@antv/s2` and the `React` and `Vue3` versions wrapped based on `@antv/s2`:

1. Basic version `@antv/s2`: Developed based on `Canvas` and [AntV/G 6.0](https://g.antv.antgroup.com), providing basic table display/interaction capabilities.

Dependencies: None

2. React version `@antv/s2-react`: Wrapped based on `React 18` and `@antv/s2`, compatible with `React 16/17` versions, and provides supporting [analysis components (`@antv/s2-react-components`)](/manual/advanced/analysis/introduction).

Dependencies:

```json
"peerDependencies": {
"@antv/s2": "^2.0.0",
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
}
```

3. Vue version `@antv/s2-vue`: Wrapped based on `Vue3`, `@antv/s2`, and `[email protected]`. <Badge type="error">Maintenance Discontinued</Badge>

Dependencies:

```json
"peerDependencies": {
"@antv/s2": "^2.0.0",
"ant-design-vue": "^3.2.0",
"vue": ">=3.x"
}
```

**In other words**, `@antv/s2` is **framework-agnostic** with **no additional dependencies**. You can use it in any framework like `Vue`, `Angular`, etc.
:::

| Package Name | Stable Version | Package Size | Downloads |
| -------- | ------ | --------- | ------ |
| [@antv/s2](https://github.com/antvis/S2/tree/next/packages/s2-core) | ![latest](https://img.shields.io/npm/v/@antv/s2/latest.svg?logo=npm) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2.svg?logo=npm) |
| [@antv/s2-react](https://github.com/antvis/S2/tree/next/packages/s2-react) | ![latest](https://img.shields.io/npm/v/@antv/s2-react/latest.svg?logo=npm) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-react@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-react.svg?logo=npm) |
| [@antv/s2-react-components](https://github.com/antvis/S2/tree/next/packages/s2-react-components) | ![latest](https://img.shields.io/npm/v/@antv/s2-react-components/latest.svg?logo=npm) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-react-components@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-react-components.svg?logo=npm) |
| [@antv/s2-vue](https://github.com/antvis/S2/tree/next/packages/s2-vue) | ![latest](https://img.shields.io/npm/v/@antv/s2-vue/latest.svg?logo=npm) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-vue@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-vue.svg?logo=npm) |
| [@antv/s2-vue](https://github.com/antvis/S2/tree/next/packages/s2-vue) (Discontinued) | ![latest](https://img.shields.io/npm/v/@antv/s2-vue/latest.svg?logo=npm) | ![size](https://img.badgesize.io/https:/unpkg.com/@antv/s2-vue@latest/dist/index.min.js?label=gzip%20size&compression=gzip) | ![download](https://img.shields.io/npm/dm/@antv/s2-vue.svg?logo=npm) |

:::info{title='How to get notifications for new version releases?'}

- Subscribe to: [https://github.com/antvis/S2/releases.atom](https://github.com/antvis/S2/releases.atom) to receive notifications of new version releases.
- `Watch` the [S2 repository](https://github.com/antvis/S2), select `Custom - Releases` to receive push notifications.

![preview](https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*NKYFSKFV_scAAAAAAAAAAAAADmJ7AQ/original)
:::
4 changes: 2 additions & 2 deletions s2-site/docs/manual/migration-v2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ If you are using the beta version `2.0.0-next.x`, pay attention to these additio

## 📦 Installation

<embed src="@/docs/common/install.zh.md"></embed>
<embed src="@/docs/common/install.en.md"></embed>

<embed src="@/docs/common/packages.zh.md"></embed>
<embed src="@/docs/common/packages.en.md"></embed>

## ⭐ New Features

Expand Down

0 comments on commit 17e3587

Please sign in to comment.