Skip to content

Commit 90edd70

Browse files
committed
docs: update tailwindcss-patch readme
1 parent 58a4fb4 commit 90edd70

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

packages/tailwindcss-patch/README-cn.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
# 使用 `tailwindcss-patch@2` 来提取你的类名吧
22

3+
- [使用 `tailwindcss-patch@2` 来提取你的类名吧](#使用-tailwindcss-patch2-来提取你的类名吧)
4+
- [安装](#安装)
5+
- [使用方式](#使用方式)
6+
- [命令行 Cli](#命令行-cli)
7+
- [开始提取吧](#开始提取吧)
8+
- [Nodejs API 的方式来使用](#nodejs-api-的方式来使用)
9+
- [配置](#配置)
10+
- [初始化](#初始化)
11+
- [What's next?](#whats-next)
12+
313
`tailwindcss-patch` 是一个 `tailwindcss` 生态的扩展项目。也是 [`tailwindcss-mangle`](https://github.com/sonofmagic/tailwindcss-mangle) 项目重要的组成部分。
414

5-
最近我发布了 `tailwindcss-patch``2.x` 版本,相比 `1.x` 版本,主要添加了一个配置文件读取和工具类名提取额功能。
15+
最近我发布了 `tailwindcss-patch``2.x` 版本,主要添加了一个配置文件读取和工具类名提取额功能。
616

717
让我们来看看怎么使用它吧。
818

@@ -35,9 +45,9 @@ npx tw-patch install
3545

3646
## 使用方式
3747

38-
## 命令行 Cli
48+
### 命令行 Cli
3949

40-
### 开始提取吧
50+
#### 开始提取吧
4151

4252
```sh
4353
npx tw-patch extract
@@ -47,7 +57,7 @@ npx tw-patch extract
4757

4858
当然,你可以通过配置文件 `tailwindcss-mangle.config.ts` 来自定义这个行为。
4959

50-
## Nodejs API 的方式来使用
60+
### Nodejs API 的方式来使用
5161

5262
```js
5363
import { TailwindcssPatcher } from 'tailwindcss-patch'
@@ -96,3 +106,11 @@ export default defineConfig({
96106
}
97107
})
98108
```
109+
110+
## What's next?
111+
112+
目前我只是提取了所有的工具类,实际上可以获取 `tailwindcss` 的上下文进行分析。你可以给我提 `issue` 或者 `pr` 的方式,来为这个项目添加更多的功能,
113+
114+
当然,提取之后这个 `json` 当然也不是只是给你看看的。你可以对它进行一些分析,而我是把它作为我 `tailwindcss-mangle` 的数据文件来使用的。
115+
116+
`tailwindcss-mangle` 本身是一个混淆工具,用来混淆 `tailwindcss` 生成的工具类,具体的使用方式就看下篇文章吧。

packages/tailwindcss-patch/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ get tailwindcss context at runtime ! extract all classes into file!
1515
- [Migration form v1 to v2](#migration-form-v1-to-v2)
1616
- [0. cli command change](#0-cli-command-change)
1717
- [1. default remove `*` in json array result](#1-default-remove--in-json-array-result)
18+
- [What's next?](#whats-next)
1819

1920
> Nodejs version should >= `16.6.0`
2021
@@ -131,3 +132,11 @@ export default defineConfig({
131132
"text-[100px]"
132133
]
133134
```
135+
136+
## What's next?
137+
138+
At the moment I just extracted all the tool classes to actually get the context of `tailwindcss` to analyze. You can add more functionality to this project by giving me `issue` or `pr`.
139+
140+
Of course, the extracted `JSON` isn't just for you to look at. You can analyze it, and I use it as a data file for my `tailwindcss-mangle`.
141+
142+
The `tailwindcss-mangle` itself is an obfuscation tool to obfuscate the tools generated by `tailwindcss`, see the next article for more details on how to use it.

0 commit comments

Comments
 (0)