weapp-tailwindcss 2.11.0 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,594 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 2.11.0 (2023-11-13)
6
+
7
+ ## Features
8
+
9
+ - 添加单独的 Nodejs API [#255](https://github.com/sonofmagic/weapp-tailwindcss/issues/255), [相关文档](https://weapp-tw.icebreaker.top/docs/quick-start/frameworks/api)
10
+
11
+ ## 2.10.1 (2023-10-17)
12
+
13
+ ## Fix
14
+
15
+ - 修复样式条件编译语法糖,uni-app 会在某些版本中破坏条件编译的注释,这时候需要这个插件去修复一下。
16
+
17
+ ## 2.10.0 (2023-10-16)
18
+
19
+ ## Features
20
+
21
+ - 添加 [uni-app-css-macro](https://weapp-tw.icebreaker.top/docs/quick-start/uni-app-css-macro) 样式条件编译语法糖相关功能
22
+
23
+ ## Chore
24
+
25
+ - 升级 `rollup` 相关依赖到 `4.x`
26
+
27
+ ## 2.9.3 (2023-09-28)
28
+
29
+ ## Features
30
+
31
+ - 添加 `tailwindcssBasedir` 配置项
32
+ - 异步化 `postcss` 以及缓存还有所有的插件
33
+
34
+ ## 2.9.2 ~ 2.9.1 (2023-09-19)
35
+
36
+ ## Features
37
+
38
+ - 建立缓存机制,大幅增加 `vite` 插件的热更新速度
39
+
40
+ ## Fixed
41
+
42
+ - mpx编译wxml属性值单引号问题 [#241](https://github.com/sonofmagic/weapp-tailwindcss/issues/241)
43
+
44
+ ## 2.9.0 (2023-09-18)
45
+
46
+ ## Features
47
+
48
+ - 建立缓存机制,大幅增加 `webpack` 插件的热更新速度
49
+
50
+ ## 2.8.4 (2023-09-08)
51
+
52
+ ## Fixed
53
+
54
+ - 修复由于使用 `eval` 导致 `jsHandler` 递归处理时的 `ast` 解析错误问题。
55
+
56
+ ## 2.8.3 (2023-09-08)
57
+
58
+ - 添加 `mergeVirtualHostAttributes` 的 `virtualHost` 虚拟节点支持
59
+
60
+ ## 2.8.0 (2023-08-15)
61
+
62
+ ## Features
63
+
64
+ - 默认使用 `jsEscapeStrategy` 的 `replace` 模式
65
+ - 重写了 `wxml` 解析器以代替正则匹配替换的方式,以做到更加精确的匹配
66
+ - 更加精准的 `customAttributes` 配置项,现在配置项中,使用字符串代表着,精确匹配标签或者属性,可以使用正则来匹配多个。
67
+
68
+ ## Chore
69
+
70
+ - 升级 `tailwindcss-patch` 相关的依赖到 `^2.1.0`
71
+
72
+ ## 2.7.0
73
+
74
+ ## Features
75
+
76
+ - 添加 `jsEscapeStrategy` 配置项,用于切换所有的 `js`字符串中,处理字符串和模板字面量的替换模式。
77
+ - 详细配置见 <https://weapp-tw.icebreaker.top/docs/api/interfaces/UserDefinedOptions#jsescapestrategy>
78
+
79
+ ## Chore
80
+
81
+ - 升级 `tailwindcss-patch` 和 `@tailwindcss-mangle` 相关依赖到 `2.x` 版本
82
+
83
+ ## 2.6.3 (2023-07-27)
84
+
85
+ ## Fixed
86
+
87
+ - 修复直接引用 `npm` 包时,不出现智能提示的问题
88
+
89
+ ## Chore
90
+
91
+ - 拆分 `@weapp-core` 相关的包引用
92
+ - 去除无用依赖,升级相关包到 `esm` 格式
93
+
94
+ ## 2.6.2 (2023-07-17)
95
+
96
+ ## Features
97
+
98
+ - 添加 `disabledDefaultTemplateHandler` 配置项,可以禁用默认的模板标签匹配转化器
99
+
100
+ ## Fixed
101
+
102
+ - 修复部分错误的 `injectAdditionalCssVarScope` 注入样式
103
+ - 修复因为英语水平差,造成长久以来的拼写问题:`templete -> template`
104
+
105
+ ## Chore
106
+
107
+ - 升级 `tailwindcss-patcher` 到 `1.2.7`
108
+
109
+ ## 2.6.1 (2023-07-17)
110
+
111
+ ### Features
112
+
113
+ - 添加 `jsPreserveClass` 配置项,用于处理 `tailwindcss` 和 `js` 转义字面量撞车的情况。
114
+ - 现在所有的默认值可以通过 `weapp-tailwindcss/defaults` 获取到了,
115
+
116
+ ### Fixed
117
+
118
+ - 修复带 `*` 的 `js` 字面量,由于和 `tailwindcss` 运行时冲突,导致错误转义的问题。
119
+
120
+ ## 2.6.0 (2023-07-11)
121
+
122
+ ### Features
123
+
124
+ - 添加 `injectAdditionalCssVarScope` 配置项,用于 `tailwindcss` 变量区域的重新注入
125
+
126
+ ### Chore
127
+
128
+ - 升级 `@csstools` 到最新版本,使用 `MIT-0` 协议
129
+ - 升级 `babel` 相关的依赖
130
+
131
+ ## 2.5.0~2.5.2 (2023-06-19)
132
+
133
+ ### Features
134
+
135
+ - 添加 `wxs` 支持,包含内联使用和引入的转义,并添加对应的配置项
136
+ - 添加多 `tailwindcss` 上下文的支持,用户可以在一个项目里,创建多个 `tailwindcss`上下文,使得不同的目录,应用不同的 `tailwindcss` 策略
137
+
138
+ ## 2.4.4 (2023-06-14)
139
+
140
+ ### Features
141
+
142
+ - 添加 `cssChildCombinatorReplaceValue` 配置项,允许用户自定义直接子代选择器行为
143
+ - 更精细化的处理了 css 选择器的转义逻辑
144
+
145
+ ## 2.4.3 (2023-06-10)
146
+
147
+ ### Fixed
148
+
149
+ - 修复class name 第一个css selector 为数字,导致的16进制选择器问题,导致小程序报错的问题,解决方案位添加首字母阻止\3转义
150
+
151
+ ## 2.4.2 (2023-05-25)
152
+
153
+ - 仓库改名为 `weapp-tailwindcss`
154
+ - 添加 `arbitraryvalues` 配置项,允许用户切换分割模式
155
+ - 使用 `typedoc` 来生成 `options` 的文档
156
+ - 重构 `mangle` 功能代码,添加对应的单元测试用例,现在的单元测试代码覆盖率已经提升到了 `99%`
157
+
158
+ ## 2.4.1 (2023-05-23)
159
+
160
+ 修复了 tarojs vue3 框架下,由于vue3产生静态节点,产生静态的html字符串,导致js转义字符串时,没有匹配到相应字符串的问题。
161
+ 不过这个这个改动也导致我们在写 tailwindcss class 的时候,使用任意值,无法在里面写双引号了。
162
+ 什么意思呢?
163
+
164
+ ```js
165
+ after:content-["你好啊,我很无聊"] ×
166
+ after:content-['你好啊,我很无聊'] √
167
+ ```
168
+
169
+ 所以接下来会开放配置项,允许用户自行开启关闭这个问题,毕竟目前只在 taro vue3 里面出现。
170
+
171
+ ## 2.4.0 (2023-05-22)
172
+
173
+ - 最小支持 nodejs 版本为 16
174
+
175
+ ## 2.3.1 (2023-05-18)
176
+
177
+ ### Chore
178
+
179
+ - 增加 `./webpack` 路径下的导出和类型,现在都可以使用 `xxx/webpack`,`xxx/vite`,`xxx/gulp`,`xxx/postcss`,`xxx/replace` 这类的方式来处理了
180
+ - 更完善的 readme.md
181
+
182
+ ### Fixed
183
+
184
+ - 修复ts直接引入 `./` 下的 `type`智能提示问题
185
+
186
+ ## 2.3.0 (2023-05-16)
187
+
188
+ ### Features
189
+
190
+ - 添加 `mangle` 配置项,可以对 `tailwindcss` 生成的类名进行缩短以及混淆
191
+ - 添加 `esm` 支持
192
+
193
+ ### Chores
194
+
195
+ - 使用 `exports` 导出项目,去除根目录下的 `.d.ts`
196
+ - 升级 `pnpm` from v7 to v8
197
+ - 去除所有 `webpack4` 相关的依赖
198
+ - 使用 `jest` 测试 `cjs` , `vitest` 测试 `vite` 相关 `case`
199
+ - 采用 `Github Action` 进行正式发布以及自动生成 `github changelog`
200
+
201
+ ## 2.2.0 (2023-05-07)
202
+
203
+ ### Features
204
+
205
+ - class选择器支持 unicode
206
+ - 重写了转义核心方法,优化性能
207
+
208
+ ### Fixed
209
+
210
+ - tarojs 在热更新时,保存非 `[jt]sx` 文件,比如 `tailwind.config.js` / `xx.scss` 文件,导致样式丢失的问题
211
+
212
+ ### Breaking Changes
213
+
214
+ - 去除所有的 v1 版本的插件,重构代码和更改目录,如果你还是想用 v1 插件,请锁定你的版本在 `2.1.5` 以下。
215
+ - 去除了无用的配置项
216
+
217
+ ## 2.1.5 (2023-05-04)
218
+
219
+ ### Features
220
+
221
+ - `js` 文件进行转义时,自动判断格式是 `cjs` 还是 `esm`
222
+ - 现在能针对 `eval` 包裹的 `js`脚本进行转义了
223
+ - 去除所有 `mangle` 相关代码,相关功能现在到 [tailwindcss-mangle](https://github.com/sonofmagic/tailwindcss-mangle)
224
+
225
+ ### Chores
226
+
227
+ - 给之前的 `v1` 版本的插件打上 `deprecated` 标记,添加对应的 `jsdoc`
228
+ - 整理目录去除 `v1` 版本的 `markdown` 文件目录,相关转移到了 `website` 中
229
+
230
+ ## 2.1.4 (2023-04-30)
231
+
232
+ ### Fixed
233
+
234
+ - 默认按照环境变量来决定是否压缩js代码,同时添加`minifiedJs`配置项手动进行指定 [[#164](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/164)]
235
+ - 修复 `webpack filesystem` 缓存,导致的二次编译结果错误问题。这是由于启用文件缓存后,`webpack`二次打包时候直接使用缓存,而不去触发`postcss`相关插件导致的。
236
+
237
+ ## 2.1.3 (2023-04-28)
238
+
239
+ ### Chores
240
+
241
+ - 升级 `tailwindcss-patch` 的最小版本,修复 `nodejs14` `npm preinstall hook` 报错的问题
242
+ - 把 `tailwindcss` 打补丁最低版本降到 `3.0.0`
243
+ - 默认 `jsMatcher` 现在会包括 `.cjs`/`.mjs` 这种文件后缀名了
244
+
245
+ ## 2.1.2 (2023-04-22)
246
+
247
+ ### Features
248
+
249
+ - 支持作为 `gulp` 插件使用 [#161](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/161)
250
+
251
+ ## 2.1.1 (2023-04-17)
252
+
253
+ ### Fixed
254
+
255
+ 修复 `bg-[url('img_src')]` 写法失效的问题 [#158](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/158)
256
+
257
+ ## 2.1.0 (2023-04-12)
258
+
259
+ ### Features
260
+
261
+ - jsHandler 增强,添加了针对模板字符串的处理
262
+ - [tailwindcss-patch](https://www.npmjs.com/package/tailwindcss-patch) 如今作为一个独立的 `npm` 包来依赖了
263
+ - 增强了所有字面量分割的方式,增强了针对 `vue3` 静态模板字符串的处理方式。
264
+
265
+ ## 2.0.2 - 2.0.4 (2023-04-07)
266
+
267
+ ### Docs
268
+
269
+ - <https://weapp-tw.icebreaker.top/>
270
+
271
+ ### Fixed
272
+
273
+ - 修复因 `typescript` 升级 `5.x` 导致的 `dts` 路径错误问题
274
+ - 展开 `:is()` [#153](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/153)
275
+
276
+ ## 2.0.1 (2023-03-21)
277
+
278
+ ### Fixed
279
+
280
+ - `rpx` 支持,在`patch`时,语法上统一转化为单引号字符串数组。
281
+
282
+ ### Chore
283
+
284
+ - 大量的文档优化
285
+
286
+ ## 1.12.8 (2022-12-17)
287
+
288
+ ### Features
289
+
290
+ - 增加 `customReplaceDictionary` 的 `simple`/`complex`模式,`simple`为更简短的`className`
291
+ - `replace` 导出所有,用于自定义运行时对 `replace` 行为进行二次封装。
292
+
293
+ ## 1.12.7 (2022-12-14)
294
+
295
+ ### Fixed
296
+
297
+ - typescript dts fixed
298
+
299
+ ### Chore
300
+
301
+ 文档更新,添加 `customAttributes` 案例
302
+
303
+ ## 1.12.6 (2022-12-06)
304
+
305
+ ### Features
306
+
307
+ - 实现 `customAttributes` `*`全匹配的逻辑
308
+
309
+ ## 1.12.4 (2022-11-25)
310
+
311
+ ### Features
312
+
313
+ - 额外导出 `UniAppWeappTailwindcssWebpackPluginV5` 用于 `uni-app` 的 `vue/cli 5` 版本
314
+
315
+ ### Chore
316
+
317
+ - 添加 `uni-app-webpack5` Demo 用于 `vue/cli 5` 版本
318
+ - uni-app Readme 完善
319
+
320
+ ## 1.12.(0-3) (2022-11-20)
321
+
322
+ ### Features
323
+
324
+ - 添加 `supportCustomLengthUnitsPatch` 配置项,默认开启。
325
+
326
+ 自从`tailwindcss 3.2.0`对任意值添加了长度单位的校验后,小程序中的`rpx`这个`wxss`单位,由于不在长度合法名单中,于是被识别成了颜色,导致与预期不符,详见:[issues/110](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/110)。
327
+
328
+ 所以这个选项是用来给`tailwindcss`运行时,自动打上一个支持`rpx`单位的补丁。默认开启,在绝大部分情况下,你都可以忽略这个配置项,除非你需要更高级的自定义。
329
+
330
+ 比较和处理的策略详见 [patcher.ts](./src/tailwindcss/patcher.ts)
331
+
332
+ - 升级 `rollup` 主版本和相关包到 `3`, 优化 `rollup` 打包生成的 `chunk`
333
+ - 添加 `cli`, 目前添加了 `patch` 指令,可手动给 `tailwindcss` 打上 `patch`。具体执行 `npx weapp-tailwindcss patch` or `npx weapp-tw patch`
334
+ - 在安装这个包后,会自动检索 `tailwindcss` 运行时源码,打上支持 `rpx` 的 `patch`。不过这种自动检索存在一定的缺陷,比如在第一次运行的时候会不生效,第二次运行的时候才生效了。这是因为 nodejs 运行时先加载好了 `tailwindcss` ,然后再来运行插件,自动给 `tailwindcss` 运行时打上 `patch`。此时由于 `tailwindcss` 模块已经加载,所以 `patch` 在第一次运行时不生效,ctrl+c 关闭之后,再次运行才生效。这种情况可以使用:
335
+
336
+ ```
337
+ "scripts": {
338
+ + "postinstall": "weapp-tw patch"
339
+ }
340
+ ```
341
+
342
+ 这样的 `npm hook` 来自动打 `patch`
343
+
344
+ ## 1.11.6 (2022-11-06)
345
+
346
+ ### Fixed
347
+
348
+ - 使用 `utf-8` 中文字体进行`wxml`条件判断时,会默认进行`unicode`转义的bug.
349
+
350
+ ## 1.11.5 (2022-10-31)
351
+
352
+ ### Chore
353
+
354
+ - 去除 `vite` 插件使用 `windicss` 和 `unocss` 的命令行警告
355
+ - 添加 `unocss` 的使用文档和案例
356
+
357
+ ## 1.11.3 (2022-10-20)
358
+
359
+ ### Features
360
+
361
+ - `customAttributes` 现在允许使用 `Map` 类型了,可以自定义匹配标签正则。
362
+
363
+ ### Chore
364
+
365
+ - `webpack jsx test case` 完善
366
+
367
+ ## 1.11.3 (2022-10-17)
368
+
369
+ ### Features
370
+
371
+ - 现在针对 `wxml` 的匹配默认会更加精准,同时也影响 `customAttributes` 配置,详见 [test/regexp-maker.test.ts](test/regexp-maker.test.ts)
372
+ - `customAttributes` 现在允许正则类型了。
373
+
374
+ ## 1.11.(1-2) (2022-10-7)
375
+
376
+ ### Chore
377
+
378
+ - 更改 `readme` `options` 的排版, 去除原先的 `md table`,让阅读体验好一些。
379
+ - 去除 `vite plugin` 的重复性创建 `function` 方法
380
+
381
+ ## 1.11.0 (2022-10-6)
382
+
383
+ ### Features
384
+
385
+ - 增加 `customAttributes` 配置,用于自定义wxml标签上的转化属性,默认转化所有的 `class` 和 `hover-class`。
386
+ - 增加 `customReplaceDictionary` 配置,自定义转化 `class`名称字典,你可以使用这个选项来简化生成的 `class`
387
+
388
+ ## 1.10.0 (2022-10-2)
389
+
390
+ ### Features
391
+
392
+ - 编写了第二版本的 `jsx` 处理方法,替换第一版本。
393
+ - 支持 `vue2/vue3` + `tsx` 开发 [#100](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/100)
394
+
395
+ ## 1.9.3 (2022-09-22)
396
+
397
+ ### Features
398
+
399
+ - 以模板为主的 `uni-app`,`mina`等等的 `wxml` 变量处理方式,当遇到二元运算符时,忽略运算符中,字符串字面量的转义。
400
+
401
+ ## 1.9.2 (2022-09-10)
402
+
403
+ ### Fixed
404
+
405
+ - `tailwindcss` 伪元素 `jit` 的自定义特殊字符。
406
+
407
+ ### Chore
408
+
409
+ - 重构重命名核心方法,为 `v2` 做准备。
410
+
411
+ ## 1.9.1 (2022-09-08)
412
+
413
+ ### Features
414
+
415
+ - `vite` 插件,可以直接注册,不需要再引入 `postcss` 插件
416
+
417
+ ### Chore
418
+
419
+ - 暂时去除 `mangle` 配置
420
+ - 去除 `lodash.groupby` 引用,减少包的体积
421
+
422
+ ## 1.9.0 (2022-09-05)
423
+
424
+ ### Features
425
+
426
+ - 添加 `mangle` 配置,用于压缩混淆 `className`,详见 [mangle.md](./docs/mangle.md)
427
+ - 重构 `transformSync`, 废弃 `mpRulePreflight`
428
+ - `weapp-tailwindcss-webpack-plugin/replacer` 额外暴露 `replaceEscapedCss`
429
+ - 暴露 `weapp-tailwindcss-webpack-plugin/mangle` 插件
430
+
431
+ ## 1.8.1 (2022-08-22)
432
+
433
+ ### Fixed
434
+
435
+ - [using-arbitrary-variants](https://tailwindcss.com/docs/hover-focus-and-other-states#using-arbitrary-variants) 自定义选择器类名支持与修复 [[#84](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/84)]
436
+
437
+ ## 1.8.0 (2022-08-17)
438
+
439
+ ### Features
440
+
441
+ - 添加 `tailwindcss` 默认伪元素的 `--tw-content` 变量初始值
442
+ - 依赖处理方式改变,`postcss` 和 `postcss-selector-parser` 从编译时打入,变为安装时连带
443
+ - 精细化的移除选择器,当发现不支持的伪类选择器时,原先的策略是把 `Rule` 整个移除,现在会遍历这个 `Rule` 的所有选择器,只把不支持的选择器的移除,当且仅当所有的选择器都被移除时,这个 `Rule` 才被整个移除
444
+
445
+ ### Fixed
446
+
447
+ - 修复 `vite` 版本 `tailwindcss` 默认注入变量选择器 `undefined` 的问题
448
+
449
+ ## 1.7.3 (2022-08-15)
450
+
451
+ ### Features
452
+
453
+ - 允许用户使用 `replaceUniversalSelectorWith` 选项来自定义`css`全局选择器`*`的替换值 [issue[#81](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/81)]
454
+
455
+ ## 1.7.2 (2022-08-15)
456
+
457
+ ### Fixed
458
+
459
+ - 修复在伪元素中使用`*`自动被替换的问题 [#79](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/79)
460
+
461
+ ### Chore
462
+
463
+ - 更改转义字典表,添加 `*`,`\\`和 `"` 的默认转义,规范化以前转义生成的`_[code]_`。
464
+
465
+ ## 1.7.1 (2022-08-06)
466
+
467
+ ### Chore
468
+
469
+ - 更新打包成`app`文档和模板选择文档
470
+ - 依赖更新
471
+
472
+ ## 1.7.0 (2022-08-04)
473
+
474
+ ### Features
475
+
476
+ - 支持 `taro 3.5`,用法如下:
477
+
478
+ 简单修改 Taro 的编译配置即可切换使用 Webpack4 或 Webpack5 进行编译:
479
+
480
+ ```js
481
+ /** config/index.js */
482
+ const config = {
483
+ // 自定义编译工具,可选 'Webpack4' 或 'Webpack5'
484
+ compiler: 'webpack5'
485
+ }
486
+ ```
487
+
488
+ 其中:
489
+
490
+ - `Webpack4` 使用 `TaroWeappTailwindcssWebpackPluginV4` 进行注册
491
+ - `Webpack5` 使用 `TaroWeappTailwindcssWebpackPluginV5` 进行注册
492
+
493
+ ## 1.6.9 (2022-07-29)
494
+
495
+ ### Features
496
+
497
+ - 添加 `disabled` 配置项,用来表示是否禁用该插件,默认为 `false`,一般用于多平台构建,有些平台比如 `h5` 不需要开启此插件,所以可以根据环境变量进行禁用。
498
+ - `onUpdate` 这个生命周期 `hook` 增加传入参数,即编译前的 `rawSource` 和 编译后的 `newSource` 作为第二和第三个参数,用于插件调试和文件内容比较。
499
+
500
+ ### Docs & Demos
501
+
502
+ - 添加 `HBuilderX` 创建的项目的[使用方式](https://github.com/sonofmagic/uni-app-vue2-tailwind-hbuilder-template#readme) 和 [Demo 项目](https://github.com/sonofmagic/uni-app-vue2-tailwind-hbuilder-template)
503
+
504
+ ## 1.6.8 (2022-07-01)
505
+
506
+ ### Features
507
+
508
+ - 添加 `cssPreflightRange` 配置项 [pull/62](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/pull/62),用来限制全局选择器影响的 `dom` 范围,从而增加或者减少 `cssPreflight` 注入的 `dom`,具体的使用方式见 `README.md`
509
+
510
+ ## 1.6.7 (2022-06-22)
511
+
512
+ ### Features
513
+
514
+ - 不再锁定 `@babel/*` 的具体版本
515
+
516
+ ### Fixed
517
+
518
+ - 修复 `remax` 版本的 `hoverClassName` 不处理的问题。(`remax`命名比较特殊)
519
+
520
+ ## 1.6.6 (2022-06-21)
521
+
522
+ ### Features
523
+
524
+ - 添加 `tailwindcss` 的 `dark mode` (media) 支持。
525
+ - 现在 `uni-app` 和 `taro` 都会同时转义 `class` 和 `hover-class` 里的内容了 [uni-app-vite-vue3-tailwind-vscode-template/issues/3](https://github.com/sonofmagic/uni-app-vite-vue3-tailwind-vscode-template/issues/3)。
526
+
527
+ ### Fixed
528
+
529
+ - 修复 `taro vue3` 版本 `babel` 处理导致打包失败的问题。
530
+
531
+ ## 1.6.5 (2022-06-19)
532
+
533
+ ### Improvement
534
+
535
+ - 优化 `ts` 生成的 `.d.ts` 文件的 `npm` 包索引。
536
+
537
+ ## 1.6.4 (2022-06-11)
538
+
539
+ ### Fixed
540
+
541
+ [issues/53](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/53) 在`BaseJsxWebpackPlugin`的新文件开始处理前强制重置`replacer`状态。(Thanks to [sandro-qiang](https://github.com/sandro-qiang))
542
+
543
+ ## 1.6.2 (2022-06-10)
544
+
545
+ ## Improvement
546
+
547
+ - 优化被分割的 `vite`,`postcss` 的 `d.ts` 智能提示
548
+
549
+ ## 1.6.1 (2022-06-08)
550
+
551
+ ## Improvement
552
+
553
+ - 优化 `Tree-shaking` ,减小`npm`包打包体积
554
+
555
+ ## 1.6.0 (2022-06-08)
556
+
557
+ ### Fixed
558
+
559
+ [issues/50](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/50) `vite` 插件依赖 `webpack` 问题
560
+
561
+ ### Breaking change
562
+
563
+ `vite` 引入插件的方式,改为:
564
+
565
+ ```js
566
+ import vwt from 'weapp-tailwindcss-webpack-plugin/vite';
567
+ import postcssWeappTailwindcssRename from 'weapp-tailwindcss-webpack-plugin/postcss';
568
+ ```
569
+
570
+ 详见 [vite.config.ts](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/blob/main/demo/uni-app-vue3-vite/vite.config.ts)
571
+
572
+ ## 1.5.0 (2022-06-01)
573
+
574
+ ### Fixed
575
+
576
+ [issues/48](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/48) Source map 指向错误问题.
577
+
578
+ ### Breaking change
579
+
580
+ 更改了兼容 `webpack 4/5` 的 `react` 版本插件的实现。原先是对 `webpack` `emit` 后的产物进行分析和替换,现在新的实现为: 动态创建一个新的 `jsx-rename-loader`,它运行在 `babel-loader` 之后,对 `babel-loader` 的产物进行替换。这样最终生成的 `Source map` 就不会存在指向错误问题了。
581
+
582
+ 收到影响的 `Plugin`:
583
+
584
+ - **taro react** : `TaroWeappTailwindcssWebpackPluginV4`
585
+ - **rax react** : `RaxTailwindcssWebpackPluginV5`
586
+ - **remax react** : `RemaxWeappTailwindcssWebpackPluginV4`
587
+
588
+ ## 1.4.4 (2022-05-19)
589
+
590
+ ## 1.4.3 (2022-05-18)
591
+
592
+ ## 1.4.0 (2022-05-15)
593
+
594
+ Breaking change: handle `wxml` with `regex` instead of `wxml-ast` [issues/38](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/38).
package/README_en.md ADDED
@@ -0,0 +1,139 @@
1
+
2
+ <p align="center">
3
+
4
+ <a href="https://weapp-tw.icebreaker.top">
5
+
6
+ <img src="./assets/logo.png" alt="weapp-tailwindcss-logo" width="128">
7
+ </a>
8
+
9
+ <br>
10
+
11
+ <h1 align="center">weapp-tailwindcss</h1>
12
+
13
+ </p>
14
+
15
+ > [简体中文(zh-cn)](./README.md) | English
16
+
17
+ ![star](https://badgen.net/github/stars/sonofmagic/weapp-tailwindcss)
18
+ ![dm0](https://badgen.net/npm/dm/weapp-tailwindcss)
19
+ ![dm1](https://badgen.net/npm/dm/weapp-tailwindcss-webpack-plugin)
20
+ ![license](https://badgen.net/npm/license/weapp-tailwindcss)
21
+ [![test](https://github.com/sonofmagic/weapp-tailwindcss/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/sonofmagic/weapp-tailwindcss/actions/workflows/test.yml)
22
+ [![codecov](https://codecov.io/gh/sonofmagic/weapp-tailwindcss/branch/main/graph/badge.svg?token=zn05qXYznt)](https://codecov.io/gh/sonofmagic/weapp-tailwindcss)
23
+
24
+ > `weapp` + `tailwindcss` all-round solution.
25
+
26
+ \[[Docs deployed in China](https://weapp-tw.icebreaker.top)\] \| \[[Github Page](https://sonofmagic.github.io/weapp-tailwindcss/)\] \| \[[1.x Docs]('./v1.md')\]
27
+
28
+ - [Features](#features)
29
+ - [Plugin Introduction](#plugin-introduction)
30
+ - [Installation and usage](#installation-and-usage)
31
+ - [Migrating from v1 to v2](#migrating-from-v1-to-v2)
32
+ - [Configuration reference](#configuration-reference)
33
+ - [Tailwindcss arbitrary values](#tailwindcss-arbitrary-values)
34
+ - [FAQ](#faq)
35
+ - [Changelog](#changelog)
36
+ - [Related projects](#related-projects)
37
+ - [CLI tools](#cli-tools)
38
+ - [template](#template)
39
+ - [how to choose?](#how-to-choose)
40
+ - [Use `uni-app cli` to build `vscode` development](#use-uni-app-cli-to-build-vscode-development)
41
+ - [Build and develop with `hbuilderx`](#build-and-develop-with-hbuilderx)
42
+ - [Use `tarojs` to build `vscode` development](#use-tarojs-to-build-vscode-development)
43
+ - [Native applet development template](#native-applet-development-template)
44
+ - [tailwindcss plugin](#tailwindcss-plugin)
45
+ - [tailwindcss preset](#tailwindcss-preset)
46
+ - [Bugs \& Issues](#bugs--issues)
47
+ - [License](#license)
48
+
49
+ ## Features
50
+
51
+ | not only `webpack` | Mainstream framework and native development support |
52
+ | --------------------------------------------------- | --------------------------------------------------- |
53
+ | ![wepback+vite+gulp](./assets/weapp-tw-plugins.png) | ![frameworks](./assets/weapp-tw-frameworks.png) |
54
+
55
+ This plugin allows you to use tailwindcss in `weapp`. At the same time, it provides the functions of tailwindcss class name escape and mangle.
56
+
57
+ > What's [`weapp`](https://mp.weixin.qq.com/cgi-bin/wx) ?
58
+ > it is a program running in [`WeChat`](https://en.wikipedia.org/wiki/WeChat),[Alipay](https://en.wikipedia.org/wiki/Alipay) or other third-party applications.
59
+ > `weapp` is a new open capability. Developers can quickly develop a small program. Mini Programs can be easily obtained and disseminated within WeChat. At the same time, have an excellent user experience.
60
+
61
+ The core plugin supports `webpack`/`vite`/`gulp` for building, covering almost all mainstream development frameworks for weapp.
62
+
63
+ These plugins can automatically identify and accurately handle all `tailwindcss` tool classes to adapt to the applet environment. At the same time, these plugins also can compress and confuse the tool class names generated by `tailwindcss`. This ability shortens the length of `css` selectors, reduces the size of generated styles, and makes class names unreadable in production.
64
+
65
+ ### Plugin Introduction
66
+
67
+ The `UnifiedWebpackPluginV5` exported from `weapp-tailwindcss/webpack` is a core plugin that can be used by all frameworks that use `webpack` for packaging.
68
+
69
+ The `UnifiedViteWeappTailwindcssPlugin` exported from `weapp-tailwindcss/vite` is a dedicated plugin for `vite`, and the configuration items and usage are consistent with the `webpack` plugin.
70
+
71
+ And our `gulp` plugin method, can be exported from `weapp-tailwindcss/gulp`.
72
+
73
+ Currently, these plugins support the latest version of the `tailwindcss v3.x.x` version and `webpack5`, `vite`, and `gulp`.
74
+
75
+ > If you are still using the `tailwindcss@2` version, then you should use the `1.x` version of this plugin. Also, make sure your `nodejs` version `>=16`. At present, the long-term maintenance version (`even-numbered version`) below `16` has ended its life cycle. It is recommended to install the `LTS` version of `nodejs`, See [nodejs/release](<https://github.com/> nodejs/release)
76
+
77
+ ## [Installation and usage](https://weapp-tw.icebreaker.top/docs/quick-start/install)
78
+
79
+ ## [Migrating from v1 to v2](https://weapp-tw.icebreaker.top/docs/migrations/v1)
80
+
81
+ ## [Configuration reference](https://weapp-tw.icebreaker.top/docs/api/interfaces/UserDefinedOptions)
82
+
83
+ ## [Tailwindcss arbitrary values](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values)
84
+
85
+ ## [FAQ](https://weapp-tw.icebreaker.top/docs/issues/)
86
+
87
+ ## [Changelog](./CHANGELOG.md)
88
+
89
+ ## Related projects
90
+
91
+ ### CLI tools
92
+
93
+ [weapp-ide-cli](https://github.com/sonofmagic/utils/tree/main/packages/weapp-ide-cli): A WeChat developer cli tool. Quickly and conveniently starts the ide directly for login, development, preview, upload code, and other functions.
94
+
95
+ ### template
96
+
97
+ #### how to choose?
98
+
99
+ If you just develop a combination of `weapp` + `h5`, then using `vscode` template is enough
100
+
101
+ If the key platform of your project is `app`, it is recommended to use the `hbuilderx` template, because `hbuilderx` comes with a toolchain for `app` construction and debugging, which can better support your development.
102
+
103
+ #### Use `uni-app cli` to build `vscode` development
104
+
105
+ [uni-app-vite-vue3-tailwind-vscode-template](https://github.com/sonofmagic/uni-app-vite-vue3-tailwind-vscode-template)
106
+
107
+ [uni-app-vue2-tailwind-vscode-template](https://github.com/sonofmagic/uni-app-vue2-tailwind-vscode-template)
108
+
109
+ #### Build and develop with `hbuilderx`
110
+
111
+ [uni-app-vue3-tailwind-hbuilder-template](https://github.com/sonofmagic/uni-app-vue3-tailwind-hbuilder-template)
112
+
113
+ #### Use `tarojs` to build `vscode` development
114
+
115
+ [taro-react-tailwind-vscode-template](https://github.com/sonofmagic/taro-react-tailwind-vscode-template)
116
+
117
+ #### Native applet development template
118
+
119
+ [weapp-tailwindcss-gulp-template(gulp打包)](https://github.com/sonofmagic/weapp-tailwindcss/tree/main/demo/gulp-app)
120
+
121
+ [weapp-native-mina-tailwindcss-template(webpack打包)](https://github.com/sonofmagic/weapp-native-mina-tailwindcss-template)
122
+
123
+ ### tailwindcss plugin
124
+
125
+ [weapp-tailwindcss-children](https://github.com/sonofmagic/weapp-tailwindcss-children)
126
+
127
+ ### tailwindcss preset
128
+
129
+ [tailwindcss-miniprogram-preset](https://github.com/sonofmagic/tailwindcss-miniprogram-preset)
130
+
131
+ ## Bugs & Issues
132
+
133
+ This plugin is currently under rapid development, if you encounter a `Bug` or want to raise an `Issue`, Welcome to submit [here](https://github.com/sonofmagic/weapp-tailwindcss/issues)
134
+
135
+ ## License
136
+
137
+ [MIT](https://opensource.org/licenses/MIT)
138
+
139
+ Copyright (c) 2022-present, [ice breaker](https://github.com/sonofmagic)
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var options = require('./options-lXV72tWf.js');
3
+ var options = require('./options-GnoWW1lR.js');
4
4
  require('micromatch');
5
5
  require('magic-string');
6
6
  require('./replace.js');
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, c as createPatch } from './options-M8pGfjj_.mjs';
1
+ import { g as getOptions, c as createPatch } from './options-QwNnkDpt.mjs';
2
2
  import 'micromatch';
3
3
  import 'magic-string';
4
4
  import './replace.mjs';
package/dist/core.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-lXV72tWf.js');
5
+ var options = require('./options-GnoWW1lR.js');
6
6
  require('micromatch');
7
7
  require('magic-string');
8
8
  require('./replace.js');
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-M8pGfjj_.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-QwNnkDpt.mjs';
2
2
  import 'micromatch';
3
3
  import 'magic-string';
4
4
  import './replace.mjs';
package/dist/gulp.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-lXV72tWf.js');
5
+ var options = require('./options-GnoWW1lR.js');
6
6
  var stream = require('node:stream');
7
7
  require('micromatch');
8
8
  require('magic-string');
package/dist/gulp.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-M8pGfjj_.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-QwNnkDpt.mjs';
2
2
  import stream from 'node:stream';
3
3
  import 'micromatch';
4
4
  import 'magic-string';
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var webpack = require('./webpack.js');
6
6
  var vite = require('./vite.js');
7
7
  var gulp = require('./gulp.js');
8
- require('./options-lXV72tWf.js');
8
+ require('./options-GnoWW1lR.js');
9
9
  require('micromatch');
10
10
  require('magic-string');
11
11
  require('./replace.js');
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  export { UnifiedWebpackPluginV5 } from './webpack.mjs';
2
2
  export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
3
3
  export { createPlugins } from './gulp.mjs';
4
- import './options-M8pGfjj_.mjs';
4
+ import './options-QwNnkDpt.mjs';
5
5
  import 'micromatch';
6
6
  import 'magic-string';
7
7
  import './replace.mjs';
@@ -322,29 +322,34 @@ function getQuotes(quote) {
322
322
  return quotes;
323
323
  }
324
324
  function generateCode(match, options = {}) {
325
- const ast = parser.parseExpression(match);
326
- traverse__default["default"](ast, {
327
- StringLiteral(path) {
328
- var _a;
329
- if (t__namespace.isMemberExpression(path.parent)) {
330
- return;
331
- }
332
- if (t__namespace.isBinaryExpression(path.parent) && t__namespace.isConditionalExpression((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.parent)) {
333
- return;
325
+ try {
326
+ const ast = parser.parseExpression(match);
327
+ traverse__default["default"](ast, {
328
+ StringLiteral(path) {
329
+ var _a;
330
+ if (t__namespace.isMemberExpression(path.parent)) {
331
+ return;
332
+ }
333
+ if (t__namespace.isBinaryExpression(path.parent) && t__namespace.isConditionalExpression((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.parent)) {
334
+ return;
335
+ }
336
+ path.node.value = replace.replaceJs(path.node.value, options);
337
+ },
338
+ noScope: true
339
+ });
340
+ const { code } = generate__default["default"](ast, {
341
+ compact: true,
342
+ minified: true,
343
+ jsescOption: {
344
+ quotes: getQuotes(options.quote),
345
+ minimal: true
334
346
  }
335
- path.node.value = replace.replaceJs(path.node.value, options);
336
- },
337
- noScope: true
338
- });
339
- const { code } = generate__default["default"](ast, {
340
- compact: true,
341
- minified: true,
342
- jsescOption: {
343
- quotes: getQuotes(options.quote),
344
- minimal: true
345
- }
346
- });
347
- return code;
347
+ });
348
+ return code;
349
+ }
350
+ catch (_a) {
351
+ return match;
352
+ }
348
353
  }
349
354
  function extract(original, reg) {
350
355
  let match = reg.exec(original);
@@ -290,29 +290,34 @@ function getQuotes(quote) {
290
290
  return quotes;
291
291
  }
292
292
  function generateCode(match, options = {}) {
293
- const ast = parseExpression(match);
294
- traverse(ast, {
295
- StringLiteral(path) {
296
- var _a;
297
- if (t.isMemberExpression(path.parent)) {
298
- return;
299
- }
300
- if (t.isBinaryExpression(path.parent) && t.isConditionalExpression((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.parent)) {
301
- return;
293
+ try {
294
+ const ast = parseExpression(match);
295
+ traverse(ast, {
296
+ StringLiteral(path) {
297
+ var _a;
298
+ if (t.isMemberExpression(path.parent)) {
299
+ return;
300
+ }
301
+ if (t.isBinaryExpression(path.parent) && t.isConditionalExpression((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.parent)) {
302
+ return;
303
+ }
304
+ path.node.value = replaceWxml(path.node.value, options);
305
+ },
306
+ noScope: true
307
+ });
308
+ const { code } = generate(ast, {
309
+ compact: true,
310
+ minified: true,
311
+ jsescOption: {
312
+ quotes: getQuotes(options.quote),
313
+ minimal: true
302
314
  }
303
- path.node.value = replaceWxml(path.node.value, options);
304
- },
305
- noScope: true
306
- });
307
- const { code } = generate(ast, {
308
- compact: true,
309
- minified: true,
310
- jsescOption: {
311
- quotes: getQuotes(options.quote),
312
- minimal: true
313
- }
314
- });
315
- return code;
315
+ });
316
+ return code;
317
+ }
318
+ catch (_a) {
319
+ return match;
320
+ }
316
321
  }
317
322
  function extract(original, reg) {
318
323
  let match = reg.exec(original);
package/dist/vite.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-lXV72tWf.js');
5
+ var options = require('./options-GnoWW1lR.js');
6
6
  var postcss = require('./postcss-Et8j4ugT.js');
7
7
  var defaults = require('./defaults-0O-zKoXE.js');
8
8
  var index = require('./index-z25r_Htj.js');
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-M8pGfjj_.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-QwNnkDpt.mjs';
2
2
  import { v as vitePluginName } from './postcss-W8i3cl5I.mjs';
3
3
  import { g as getGroupedEntries } from './defaults-dz6xGhOP.mjs';
4
4
  import { c as createDebug } from './index-06BoOZig.mjs';
package/dist/webpack.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-lXV72tWf.js');
5
+ var options = require('./options-GnoWW1lR.js');
6
6
  var path = require('node:path');
7
7
  var fs = require('node:fs');
8
8
  var postcss = require('./postcss-Et8j4ugT.js');
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-M8pGfjj_.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-QwNnkDpt.mjs';
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs';
4
4
  import { a as pluginName } from './postcss-W8i3cl5I.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "2.11.0",
3
+ "version": "2.11.2",
4
4
  "description": "把tailwindcss jit引擎,带给小程序开发者们! bring tailwindcss jit engine to miniprogram developers!",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -67,6 +67,49 @@
67
67
  }
68
68
  },
69
69
  "sideEffects": false,
70
+ "scripts": {
71
+ "dev": "pnpm clean && pnpm dts && cross-env NODE_ENV=development rollup -c rollup.config.ts --configPlugin typescript -w",
72
+ "build": "pnpm clean && cross-env NODE_ENV=production rollup -c rollup.config.ts --configPlugin typescript && pnpm dts",
73
+ "build:demo": "pnpm demo:del-dist && cross-env NODE_ENV=demo rollup -c rollup.config.ts --configPlugin typescript && pnpm demo:sync-dist",
74
+ "build:tsc": "cross-env NODE_ENV=development tsc --build tsconfig.json",
75
+ "dts": "tsc --emitDeclarationOnly -p tsconfig.dts.json",
76
+ "test": "npm run postinstall && cross-env DEBUG=weapp-tw jest && vitest run",
77
+ "jest-u": "jest -u",
78
+ "jest:u": "jest -u",
79
+ "test:dev": "vitest",
80
+ "vitest:coverage": "vitest run --coverage",
81
+ "e2e": "vitest run -c ./vitest.e2e.config.ts",
82
+ "e2e:dev": "vitest -c ./vitest.e2e.config.ts",
83
+ "e2e:u": "vitest run -u -c ./vitest.e2e.config.ts",
84
+ "test:all": "cross-env JEST_INVALID_SKIP_CASES=1 jest",
85
+ "init:rename": "node scripts/init/rename.js",
86
+ "clean": "node scripts/clean.js",
87
+ "debug:web": "cd demo/web && pnpm dev",
88
+ "raw": "ts-node scripts/raw",
89
+ "get-decl": "ts-node scripts/get-decl.ts",
90
+ "demo:dev": "node scripts/demo/dev.js",
91
+ "demo:build": "node scripts/demo/build.js",
92
+ "demo:build:local": "node scripts/demo/build.js --local",
93
+ "demo:link": "node scripts/demo/link.js",
94
+ "demo:install": "node scripts/demo/install.js",
95
+ "demo:install:beta": "node scripts/demo/install.js --beta",
96
+ "demo:remove-deps": "node scripts/demo/del.js",
97
+ "demo:remove-test-coms": "node scripts/demo/remove-test-coms.js",
98
+ "demo:sync-dist": "node scripts/demo/copy-dist.js",
99
+ "demo:del-dist": "node scripts/demo/del-dist.js",
100
+ "sync": "cnpm sync weapp-tailwindcss-webpack-plugin weapp-tailwindcss",
101
+ "generate:readme": "ts-node scripts/readme/write.ts",
102
+ "format": "prettier --check \"src/**/*.{ts,js}\" -w",
103
+ "format:test": "prettier --check \"test/**/*.test.{ts,js}\" -w",
104
+ "ls:pack": "npm pack --dry-run",
105
+ "cli:patch": "node bin/weapp-tailwindcss.js patch",
106
+ "prepare": "ts-patch install -s",
107
+ "release": "bumpp",
108
+ "css-build": "css2plugin build css-plugin.css css-plugin-scss.scss --cwd test/fixtures/css",
109
+ "css-build-out": "css2plugin build css-plugin.css css-plugin-scss.scss --cwd test/fixtures/css --out tw-plugins",
110
+ "-------": "-----------",
111
+ "postinstall": "node bin/weapp-tailwindcss.js patch"
112
+ },
70
113
  "repository": {
71
114
  "type": "git",
72
115
  "url": "git+https://github.com/sonofmagic/weapp-tailwindcss.git"
@@ -181,7 +224,7 @@
181
224
  "postcss-rem-to-responsive-pixel": "^5.1.3",
182
225
  "prettier": "^3.1.0",
183
226
  "promisify-loader-runner": "^1.0.0",
184
- "rollup": "^4.4.0",
227
+ "rollup": "^4.4.1",
185
228
  "rollup-plugin-visualizer": "^5.9.2",
186
229
  "sass": "^1.69.5",
187
230
  "style-loader": "^3.3.3",
@@ -212,7 +255,7 @@
212
255
  "@weapp-core/escape": "^2.0.0",
213
256
  "@weapp-core/regex": "^1.0.1",
214
257
  "debug": "^4.3.4",
215
- "htmlparser2": "^9.0.0",
258
+ "htmlparser2": "9.0.0",
216
259
  "loader-utils": "^2.0.3",
217
260
  "lru-cache": "^10.0.2",
218
261
  "magic-string": "^0.30.5",
@@ -226,47 +269,5 @@
226
269
  "packageManager": "pnpm@8.10.2",
227
270
  "engines": {
228
271
  "node": ">=16.6.0"
229
- },
230
- "scripts": {
231
- "dev": "yarn clean && yarn dts && cross-env NODE_ENV=development rollup -c rollup.config.ts --configPlugin typescript -w",
232
- "build": "yarn clean && cross-env NODE_ENV=production rollup -c rollup.config.ts --configPlugin typescript && yarn dts",
233
- "build:demo": "yarn demo:del-dist && cross-env NODE_ENV=demo rollup -c rollup.config.ts --configPlugin typescript && yarn demo:sync-dist",
234
- "build:tsc": "cross-env NODE_ENV=development tsc --build tsconfig.json",
235
- "dts": "tsc --emitDeclarationOnly -p tsconfig.dts.json",
236
- "test": "npm run postinstall && cross-env DEBUG=weapp-tw jest && vitest run",
237
- "jest-u": "jest -u",
238
- "jest:u": "jest -u",
239
- "test:dev": "vitest",
240
- "vitest:coverage": "vitest run --coverage",
241
- "e2e": "vitest run -c ./vitest.e2e.config.ts",
242
- "e2e:dev": "vitest -c ./vitest.e2e.config.ts",
243
- "e2e:u": "vitest run -u -c ./vitest.e2e.config.ts",
244
- "test:all": "cross-env JEST_INVALID_SKIP_CASES=1 jest",
245
- "init:rename": "node scripts/init/rename.js",
246
- "clean": "node scripts/clean.js",
247
- "debug:web": "cd demo/web && yarn dev",
248
- "raw": "ts-node scripts/raw",
249
- "get-decl": "ts-node scripts/get-decl.ts",
250
- "demo:dev": "node scripts/demo/dev.js",
251
- "demo:build": "node scripts/demo/build.js",
252
- "demo:build:local": "node scripts/demo/build.js --local",
253
- "demo:link": "node scripts/demo/link.js",
254
- "demo:install": "node scripts/demo/install.js",
255
- "demo:install:beta": "node scripts/demo/install.js --beta",
256
- "demo:remove-deps": "node scripts/demo/del.js",
257
- "demo:remove-test-coms": "node scripts/demo/remove-test-coms.js",
258
- "demo:sync-dist": "node scripts/demo/copy-dist.js",
259
- "demo:del-dist": "node scripts/demo/del-dist.js",
260
- "sync": "cnpm sync weapp-tailwindcss-webpack-plugin weapp-tailwindcss",
261
- "generate:readme": "ts-node scripts/readme/write.ts",
262
- "format": "prettier --check \"src/**/*.{ts,js}\" -w",
263
- "format:test": "prettier --check \"test/**/*.test.{ts,js}\" -w",
264
- "ls:pack": "npm pack --dry-run",
265
- "cli:patch": "node bin/weapp-tailwindcss.js patch",
266
- "release": "bumpp",
267
- "css-build": "css2plugin build css-plugin.css css-plugin-scss.scss --cwd test/fixtures/css",
268
- "css-build-out": "css2plugin build css-plugin.css css-plugin-scss.scss --cwd test/fixtures/css --out tw-plugins",
269
- "-------": "-----------",
270
- "postinstall": "node bin/weapp-tailwindcss.js patch"
271
272
  }
272
- }
273
+ }