weapp-tailwindcss 3.0.7 → 3.0.9
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/README.md +33 -58
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/gulp.js +2 -2
- package/dist/gulp.mjs +2 -2
- package/dist/{index-piGwxYqY.js → index-63THS8xH.js} +1 -1
- package/dist/{index-MBz4BRF5.js → index-JQFi9orv.js} +1 -1
- package/dist/{index-1Jx4_-5U.mjs → index-KDDyuNhv.mjs} +1 -1
- package/dist/{index-7vNg_CcK.mjs → index-q-Es6emh.mjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{options-Z5mDnfcr.mjs → options-Z3Pay3SJ.mjs} +29 -24
- package/dist/{options-aUrnsvKZ.js → options-ymQS0nTj.js} +29 -24
- package/dist/{v5-qZ8Z3Aac.mjs → v5-uxlJgYR1.mjs} +1 -1
- package/dist/{v5-esmS1BQl.js → v5-wLmuN-qW.js} +1 -1
- package/dist/vite.js +2 -2
- package/dist/vite.mjs +2 -2
- package/dist/webpack.js +2 -2
- package/dist/webpack.mjs +2 -2
- package/dist/webpack4.js +1 -1
- package/dist/webpack4.mjs +1 -1
- package/package.json +22 -22
package/README.md
CHANGED
|
@@ -24,38 +24,26 @@
|
|
|
24
24
|
> 降低开发维护成本,提升开发效率的 `小程序` `tailwindcss` 全方面解决方案
|
|
25
25
|
>
|
|
26
26
|
> 我的其他项目:
|
|
27
|
-
> `
|
|
28
|
-
>
|
|
29
|
-
> 想试试在小程序里使用**编译时**`CSS-in-JS` 工具? 👉🏻👉🏻试试 [`weapp-pandacss`](https://github.com/sonofmagic/weapp-pandacss)
|
|
27
|
+
> `Tailwindcss/Unocss UI` 生成提取器: [`IceStack`](https://ui.icebreaker.top/zh-CN) 已经发布,快来用它管理你的原子化`CSS` 组件吧!
|
|
30
28
|
|
|
31
29
|
\[[国内部署的文档地址](https://weapp-tw.icebreaker.top)\] \| \[[备用Github Page](https://sonofmagic.github.io/weapp-tailwindcss/)\] \| \[[1.x文档]('./v1.md')\]
|
|
32
30
|
|
|
33
|
-
- [Tips](#tips)
|
|
34
31
|
- [特性](#特性)
|
|
35
32
|
- [插件介绍](#插件介绍)
|
|
36
33
|
- [安装与使用方式](#安装与使用方式)
|
|
37
|
-
- [
|
|
38
|
-
- [配置项参考](#配置项参考)
|
|
39
|
-
- [使用tailwindcss任意值(arbitrary values)](#使用tailwindcss任意值arbitrary-values)
|
|
34
|
+
- [生态和解决方案](#生态和解决方案)
|
|
40
35
|
- [常见问题](#常见问题)
|
|
36
|
+
- [现成配置好的各个框架的模板](#现成配置好的各个框架的模板)
|
|
37
|
+
- [旧版本迁移指南](#旧版本迁移指南)
|
|
38
|
+
- [配置项参考](#配置项参考)
|
|
41
39
|
- [变更日志](#变更日志)
|
|
40
|
+
- [Tips](#tips)
|
|
41
|
+
- [Contribute](#contribute)
|
|
42
|
+
- [License](#license)
|
|
43
|
+
- [Star History](#star-history)
|
|
42
44
|
- [Related projects](#related-projects)
|
|
43
45
|
- [CLI 工具](#cli-工具)
|
|
44
|
-
- [模板 template](#模板-template)
|
|
45
|
-
- [如何选择?](#如何选择)
|
|
46
|
-
- [使用`uni-app cli`进行构建 `vscode`开发](#使用uni-app-cli进行构建-vscode开发)
|
|
47
|
-
- [使用`hbuilderx` 进行构建和开发](#使用hbuilderx-进行构建和开发)
|
|
48
|
-
- [使用`tarojs`进行构建 `vscode`开发](#使用tarojs进行构建-vscode开发)
|
|
49
|
-
- [原生小程序开发模板](#原生小程序开发模板)
|
|
50
|
-
- [tailwindcss plugin / util](#tailwindcss-plugin--util)
|
|
51
46
|
- [weapp-pandacss](#weapp-pandacss)
|
|
52
|
-
- [Bugs \& Issues](#bugs--issues)
|
|
53
|
-
|
|
54
|
-
## Tips
|
|
55
|
-
|
|
56
|
-
自从 `2.3.3` 版本开始,我发布了一个额外的包叫 `weapp-tailwindcss`,它和 `weapp-tailwindcss-webpack-plugin` 代码版本完全一致,且保持发布版本的同步。以后可以都去安装 `weapp-tailwindcss` 这个包(当然现在 `webpack-plugin` 这个包也不会废弃,也会时刻保持版本的同步)。为什么要这么做的原因,主要是因为 `weapp-tailwindcss-webpack-plugin` 这个名字,已经不适合描述现在这种,多插件并存的状态了,为了以后的发展就改了个名字。
|
|
57
|
-
|
|
58
|
-
前沿阅读: [What’s Tailwind Oxide Engine? The Next Evolution of Tailwind CSS](https://medium.com/@bomber.marek/whats-tailwind-oxide-engine-the-next-evolution-of-tailwind-css-32e7ef8e19a1),未来 `tailwindcss` 会切换到这个引擎来大幅加快构建和运行速度,当然等它发布正式版本的时候,我也会尽可能第一时间去进行兼容新的引擎。
|
|
59
47
|
|
|
60
48
|
## 特性
|
|
61
49
|
|
|
@@ -77,68 +65,55 @@
|
|
|
77
65
|
|
|
78
66
|
目前,这些插件支持最新版本的 `tailwindcss v3.x.x` 版本和 `webpack5`,`vite` 和 `gulp`。
|
|
79
67
|
|
|
80
|
-
> 如果你还在使用 `tailwindcss@2` 版本,那你应该使用本插件的 `1.x` 版本。另外请确保你的 `nodejs` 版本 `>=16.6.0`。目前低于 `16` 的长期维护版本(`偶数版本`) 都已经结束了生命周期,建议安装 `nodejs` 的 `LTS`版本,详见 [nodejs/release](https://github.com/nodejs/release)
|
|
68
|
+
> 如果你还在使用 `tailwindcss@2` 版本,那你应该使用本插件的 `1.x`/`webpack4` 版本。另外请确保你的 `nodejs` 版本 `>=16.6.0`。目前低于 `16` 的长期维护版本(`偶数版本`) 都已经结束了生命周期,建议安装 `nodejs` 的 `LTS`版本,详见 [nodejs/release](https://github.com/nodejs/release)
|
|
81
69
|
|
|
82
70
|
## [安装与使用方式](https://weapp-tw.icebreaker.top/docs/quick-start/install)
|
|
83
71
|
|
|
84
|
-
## [
|
|
85
|
-
|
|
86
|
-
<!-- ## [js文件内容中taiwlindcss类名的精确转化与忽略策略](https://weapp-tw.icebreaker.top/docs/options/comments) -->
|
|
87
|
-
|
|
88
|
-
## [配置项参考](https://weapp-tw.icebreaker.top/docs/api/interfaces/UserDefinedOptions)
|
|
89
|
-
|
|
90
|
-
## [使用tailwindcss任意值(arbitrary values)](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values)
|
|
72
|
+
## [生态和解决方案](https://weapp-tw.icebreaker.top/docs/community/templates)
|
|
91
73
|
|
|
92
74
|
## [常见问题](https://weapp-tw.icebreaker.top/docs/issues/)
|
|
93
75
|
|
|
94
|
-
## [
|
|
95
|
-
|
|
96
|
-
## Related projects
|
|
97
|
-
|
|
98
|
-
### CLI 工具
|
|
76
|
+
## [现成配置好的各个框架的模板](https://weapp-tw.icebreaker.top/docs/community/templates)
|
|
99
77
|
|
|
100
|
-
[
|
|
78
|
+
## [旧版本迁移指南](https://weapp-tw.icebreaker.top/docs/migrations/v2)
|
|
101
79
|
|
|
102
|
-
|
|
80
|
+
## [配置项参考](https://weapp-tw.icebreaker.top/docs/api/interfaces/UserDefinedOptions)
|
|
103
81
|
|
|
104
|
-
|
|
82
|
+
## [变更日志](./CHANGELOG.md)
|
|
105
83
|
|
|
106
|
-
|
|
84
|
+
## Tips
|
|
107
85
|
|
|
108
|
-
|
|
86
|
+
自从 `2.3.3` 版本开始,我发布了一个额外的包叫 `weapp-tailwindcss`,它和 `weapp-tailwindcss-webpack-plugin` 代码版本完全一致,且保持发布版本的同步。以后可以都去安装 `weapp-tailwindcss` 这个包,当然现在 `weapp-tailwindcss-webpack-plugin` 这个包也不会废弃,也会时刻保持版本的同步。
|
|
109
87
|
|
|
110
|
-
|
|
88
|
+
为什么要这么做的原因,主要是因为 `weapp-tailwindcss-webpack-plugin` 这个名字,已经不适合描述现在这种,多插件并存的状态了,为了以后的发展改个名。
|
|
111
89
|
|
|
112
|
-
[
|
|
90
|
+
前沿阅读: [What’s Tailwind Oxide Engine? The Next Evolution of Tailwind CSS](https://medium.com/@bomber.marek/whats-tailwind-oxide-engine-the-next-evolution-of-tailwind-css-32e7ef8e19a1),未来 `tailwindcss` 会切换到这个引擎来大幅加快构建和运行速度,当然等它发布正式版本的时候,我也会尽可能第一时间去进行兼容新的引擎。
|
|
113
91
|
|
|
114
|
-
|
|
92
|
+
## Contribute
|
|
115
93
|
|
|
116
|
-
|
|
94
|
+
我们邀请你来贡献和帮助改进 `weapp-tailwindcss` 💚💚💚
|
|
117
95
|
|
|
118
|
-
|
|
96
|
+
以下有几个方式可以参与:
|
|
119
97
|
|
|
120
|
-
|
|
98
|
+
- 报告错误:如果您遇到任何错误或问题,请提`issue`并提供完善的错误信息和复现方式。
|
|
99
|
+
- 建议:有增强 `weapp-tailwindcss` 的想法吗?请提 `issue` 来分享您的建议。
|
|
100
|
+
- 文档:如果您对文档有更好的见解或者更棒的修辞方式,欢迎 `pr`。
|
|
101
|
+
- 代码:任何人的代码都不是完美的,我们欢迎你通过 `pr` 给代码提供更好的质量与活力。
|
|
121
102
|
|
|
122
|
-
|
|
103
|
+
## License
|
|
123
104
|
|
|
124
|
-
|
|
105
|
+
[MIT](./LICENSE)
|
|
125
106
|
|
|
126
|
-
|
|
107
|
+
## Star History
|
|
127
108
|
|
|
128
|
-
[weapp-
|
|
109
|
+
[](https://star-history.com/#sonofmagic/weapp-tailwindcss&Date)
|
|
129
110
|
|
|
130
|
-
|
|
111
|
+
## Related projects
|
|
131
112
|
|
|
132
|
-
|
|
113
|
+
### CLI 工具
|
|
133
114
|
|
|
134
|
-
|
|
115
|
+
[weapp-ide-cli](https://github.com/sonofmagic/utils/tree/main/packages/weapp-ide-cli): 一个微信开发者工具命令行,快速方便的直接启动 ide 进行登录,开发,预览,上传代码等等功能。
|
|
135
116
|
|
|
136
117
|
### weapp-pandacss
|
|
137
118
|
|
|
138
119
|
[weapp-pandacss](https://github.com/sonofmagic/weapp-pandacss) `CSS-in-JS` 编译时框架的小程序适配器
|
|
139
|
-
|
|
140
|
-
## Bugs & Issues
|
|
141
|
-
|
|
142
|
-
目前这个插件正在快速的开发中,如果遇到 `Bug` 或者想提出 `Issue`
|
|
143
|
-
|
|
144
|
-
[欢迎提交到此处](https://github.com/sonofmagic/weapp-tailwindcss/issues)
|
package/dist/cli.js
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import semver from 'semver';
|
|
2
|
-
import { g as getOptions, a as createPatch } from './options-
|
|
2
|
+
import { g as getOptions, a as createPatch } from './options-Z3Pay3SJ.mjs';
|
|
3
3
|
import { W as WEAPP_TW_REQUIRED_NODE_VERSION } from './index-_74RBzwy.mjs';
|
|
4
4
|
import 'magic-string';
|
|
5
5
|
import './replace.mjs';
|
package/dist/core.js
CHANGED
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-Z3Pay3SJ.mjs';
|
|
2
2
|
import 'magic-string';
|
|
3
3
|
import './replace.mjs';
|
|
4
4
|
import '@weapp-core/escape';
|
package/dist/gulp.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-JQFi9orv.js');
|
|
6
|
+
require('./options-ymQS0nTj.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as createPlugins } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { c as createPlugins } from './index-q-Es6emh.mjs';
|
|
2
|
+
import './options-Z3Pay3SJ.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var options = require('./options-
|
|
3
|
+
var options = require('./options-ymQS0nTj.js');
|
|
4
4
|
var stream = require('node:stream');
|
|
5
5
|
|
|
6
6
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-Z3Pay3SJ.mjs';
|
|
2
2
|
import { v as vitePluginName } from './index-_74RBzwy.mjs';
|
|
3
3
|
import { g as getGroupedEntries } from './defaults-c-Db9ovX.mjs';
|
|
4
4
|
import { c as createDebug } from './index-06BoOZig.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-Z3Pay3SJ.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
3
|
|
|
4
4
|
const Transform = stream.Transform;
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-wLmuN-qW.js');
|
|
6
|
+
var index = require('./index-63THS8xH.js');
|
|
7
|
+
var index$1 = require('./index-JQFi9orv.js');
|
|
8
|
+
require('./options-ymQS0nTj.js');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('./replace.js');
|
|
11
11
|
require('@weapp-core/escape');
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
3
|
-
export { c as createPlugins } from './index-
|
|
4
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-uxlJgYR1.mjs';
|
|
2
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-KDDyuNhv.mjs';
|
|
3
|
+
export { c as createPlugins } from './index-q-Es6emh.mjs';
|
|
4
|
+
import './options-Z3Pay3SJ.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import './replace.mjs';
|
|
7
7
|
import '@weapp-core/escape';
|
|
@@ -79,7 +79,7 @@ function replaceHandleValue(str, node, options, ms, offset = 0, needEscaped = fa
|
|
|
79
79
|
if (ctx) {
|
|
80
80
|
rawStr = ctx.jsHandler(rawStr);
|
|
81
81
|
}
|
|
82
|
-
rawStr = rawStr.
|
|
82
|
+
rawStr = rawStr.replace(new RegExp(escapeStringRegexp(v)), replaceWxml(v, {
|
|
83
83
|
escapeMap
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
@@ -202,29 +202,34 @@ function getQuotes(quote) {
|
|
|
202
202
|
return quote === "'" ? 'double' : 'single';
|
|
203
203
|
}
|
|
204
204
|
function generateCode(match, options = {}) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
205
|
+
try {
|
|
206
|
+
const ast = parseExpression(match);
|
|
207
|
+
traverse(ast, {
|
|
208
|
+
StringLiteral(path) {
|
|
209
|
+
var _a;
|
|
210
|
+
if (t.isMemberExpression(path.parent)) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (t.isBinaryExpression(path.parent) && t.isConditionalExpression((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.parent)) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
path.node.value = replaceWxml(path.node.value, options);
|
|
217
|
+
},
|
|
218
|
+
noScope: true
|
|
219
|
+
});
|
|
220
|
+
const { code } = generate(ast, {
|
|
221
|
+
compact: true,
|
|
222
|
+
minified: true,
|
|
223
|
+
jsescOption: {
|
|
224
|
+
quotes: getQuotes(options.quote),
|
|
225
|
+
minimal: true
|
|
214
226
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
minified: true,
|
|
222
|
-
jsescOption: {
|
|
223
|
-
quotes: getQuotes(options.quote),
|
|
224
|
-
minimal: true
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
return code;
|
|
227
|
+
});
|
|
228
|
+
return code;
|
|
229
|
+
}
|
|
230
|
+
catch (_a) {
|
|
231
|
+
return match;
|
|
232
|
+
}
|
|
228
233
|
}
|
|
229
234
|
function extract(original, reg) {
|
|
230
235
|
let match = reg.exec(original);
|
|
@@ -528,7 +533,7 @@ function useMangleStore() {
|
|
|
528
533
|
const arr = splitCode(rawSource);
|
|
529
534
|
for (const x of arr) {
|
|
530
535
|
if (ctx.runtimeSet.has(x)) {
|
|
531
|
-
rawSource = rawSource.
|
|
536
|
+
rawSource = rawSource.replace(new RegExp(escapeStringRegexp(x)), ctx.classGenerator.generateClassName(x).name);
|
|
532
537
|
}
|
|
533
538
|
}
|
|
534
539
|
return rawSource;
|
|
@@ -110,7 +110,7 @@ function replaceHandleValue(str, node, options, ms, offset = 0, needEscaped = fa
|
|
|
110
110
|
if (ctx) {
|
|
111
111
|
rawStr = ctx.jsHandler(rawStr);
|
|
112
112
|
}
|
|
113
|
-
rawStr = rawStr.
|
|
113
|
+
rawStr = rawStr.replace(new RegExp(regex.escapeStringRegexp(v)), replace.replaceJs(v, {
|
|
114
114
|
escapeMap
|
|
115
115
|
}));
|
|
116
116
|
}
|
|
@@ -233,29 +233,34 @@ function getQuotes(quote) {
|
|
|
233
233
|
return quote === "'" ? 'double' : 'single';
|
|
234
234
|
}
|
|
235
235
|
function generateCode(match, options = {}) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
236
|
+
try {
|
|
237
|
+
const ast = parser.parseExpression(match);
|
|
238
|
+
traverse__default["default"](ast, {
|
|
239
|
+
StringLiteral(path) {
|
|
240
|
+
var _a;
|
|
241
|
+
if (t__namespace.isMemberExpression(path.parent)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (t__namespace.isBinaryExpression(path.parent) && t__namespace.isConditionalExpression((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.parent)) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
path.node.value = replace.replaceJs(path.node.value, options);
|
|
248
|
+
},
|
|
249
|
+
noScope: true
|
|
250
|
+
});
|
|
251
|
+
const { code } = generate__default["default"](ast, {
|
|
252
|
+
compact: true,
|
|
253
|
+
minified: true,
|
|
254
|
+
jsescOption: {
|
|
255
|
+
quotes: getQuotes(options.quote),
|
|
256
|
+
minimal: true
|
|
245
257
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
minified: true,
|
|
253
|
-
jsescOption: {
|
|
254
|
-
quotes: getQuotes(options.quote),
|
|
255
|
-
minimal: true
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
return code;
|
|
258
|
+
});
|
|
259
|
+
return code;
|
|
260
|
+
}
|
|
261
|
+
catch (_a) {
|
|
262
|
+
return match;
|
|
263
|
+
}
|
|
259
264
|
}
|
|
260
265
|
function extract(original, reg) {
|
|
261
266
|
let match = reg.exec(original);
|
|
@@ -559,7 +564,7 @@ function useMangleStore() {
|
|
|
559
564
|
const arr = splitCode(rawSource);
|
|
560
565
|
for (const x of arr) {
|
|
561
566
|
if (ctx.runtimeSet.has(x)) {
|
|
562
|
-
rawSource = rawSource.
|
|
567
|
+
rawSource = rawSource.replace(new RegExp(regex.escapeStringRegexp(x)), ctx.classGenerator.generateClassName(x).name);
|
|
563
568
|
}
|
|
564
569
|
}
|
|
565
570
|
return rawSource;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-Z3Pay3SJ.mjs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import { b as pluginName } from './index-_74RBzwy.mjs';
|
package/dist/vite.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-63THS8xH.js');
|
|
6
|
+
require('./options-ymQS0nTj.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-KDDyuNhv.mjs';
|
|
2
|
+
import './options-Z3Pay3SJ.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
package/dist/webpack.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-wLmuN-qW.js');
|
|
6
|
+
require('./options-ymQS0nTj.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-uxlJgYR1.mjs';
|
|
2
|
+
import './options-Z3Pay3SJ.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
package/dist/webpack4.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-ymQS0nTj.js');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
8
|
var webpackSources = require('webpack-sources');
|
package/dist/webpack4.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-Z3Pay3SJ.mjs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import { ConcatSource, RawSource } from 'webpack-sources';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "把tailwindcss jit引擎,带给小程序开发者们! bring tailwindcss jit engine to miniprogram developers!",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
},
|
|
123
123
|
"homepage": "https://weapp-tw.icebreaker.top",
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@babel/core": "^7.23.
|
|
125
|
+
"@babel/core": "^7.23.9",
|
|
126
126
|
"@icebreakers/cli": "0.1.1",
|
|
127
127
|
"@icebreakers/readme": "0.1.0",
|
|
128
128
|
"@rollup/plugin-alias": "^5.1.0",
|
|
@@ -145,20 +145,20 @@
|
|
|
145
145
|
"@types/lodash": "^4.14.202",
|
|
146
146
|
"@types/md5": "^2.3.5",
|
|
147
147
|
"@types/micromatch": "^4.0.6",
|
|
148
|
-
"@types/node": "^20.11.
|
|
148
|
+
"@types/node": "^20.11.11",
|
|
149
149
|
"@types/semver": "^7.5.6",
|
|
150
150
|
"@types/vinyl": "^2.0.11",
|
|
151
151
|
"@types/webpack": "^5.28.5",
|
|
152
152
|
"@types/webpack-sources": "^3.2.3",
|
|
153
153
|
"@types/webpack4": "npm:@types/webpack@4",
|
|
154
|
-
"@vitest/coverage-v8": "^1.
|
|
155
|
-
"@vitest/ui": "^1.
|
|
156
|
-
"autoprefixer": "^10.4.
|
|
154
|
+
"@vitest/coverage-v8": "^1.2.2",
|
|
155
|
+
"@vitest/ui": "^1.2.2",
|
|
156
|
+
"autoprefixer": "^10.4.17",
|
|
157
157
|
"babel-loader": "^9.1.3",
|
|
158
|
-
"bumpp": "^9.
|
|
158
|
+
"bumpp": "^9.3.0",
|
|
159
159
|
"colorette": "^2.0.20",
|
|
160
160
|
"cross-env": "^7.0.3",
|
|
161
|
-
"css-loader": "^6.9.
|
|
161
|
+
"css-loader": "^6.9.1",
|
|
162
162
|
"css-to-tailwindcss-plugin": "^0.2.5",
|
|
163
163
|
"dedent": "^1.5.1",
|
|
164
164
|
"defu": "6.1.4",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"fast-glob": "^3.3.2",
|
|
174
174
|
"fs-extra": "^11.2.0",
|
|
175
175
|
"gulp": "^4.0.2",
|
|
176
|
-
"gulp-postcss": "^9.0
|
|
176
|
+
"gulp-postcss": "^9.1.0",
|
|
177
177
|
"html-loader": "^4.2.0",
|
|
178
178
|
"js-beautify": "^1.14.11",
|
|
179
179
|
"klaw": "^4.1.0",
|
|
@@ -183,32 +183,32 @@
|
|
|
183
183
|
"pkg-types": "^1.0.3",
|
|
184
184
|
"postcss-load-config": "^5.0.2",
|
|
185
185
|
"postcss-loader": "^7.3.4",
|
|
186
|
-
"prettier": "^3.
|
|
186
|
+
"prettier": "^3.2.4",
|
|
187
187
|
"promisify-loader-runner": "^1.0.1",
|
|
188
|
-
"rollup": "^4.9.
|
|
188
|
+
"rollup": "^4.9.6",
|
|
189
189
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
190
|
-
"sass": "^1.
|
|
190
|
+
"sass": "^1.70.0",
|
|
191
191
|
"style-loader": "^3.3.4",
|
|
192
192
|
"tailwindcss": "^3.4.1",
|
|
193
193
|
"ts-node": "^10.9.2",
|
|
194
194
|
"ts-patch": "^3.1.2",
|
|
195
|
-
"tsd": "^0.30.
|
|
195
|
+
"tsd": "^0.30.4",
|
|
196
196
|
"tslib": "^2.6.2",
|
|
197
197
|
"typescript": "^5.3.3",
|
|
198
198
|
"typescript-transform-paths": "^3.4.6",
|
|
199
199
|
"vinyl": "^3.0.0",
|
|
200
|
-
"vite": "^5.0.
|
|
201
|
-
"vitest": "^1.
|
|
200
|
+
"vite": "^5.0.12",
|
|
201
|
+
"vitest": "^1.2.2",
|
|
202
202
|
"weapp-tailwindcss-children": "^0.1.0",
|
|
203
|
-
"webpack": "^5.
|
|
203
|
+
"webpack": "^5.90.0",
|
|
204
204
|
"webpack-build-utils": "^0.0.7"
|
|
205
205
|
},
|
|
206
206
|
"dependencies": {
|
|
207
207
|
"@ast-core/escape": "^1.0.1",
|
|
208
208
|
"@babel/generator": "7.23.6",
|
|
209
|
-
"@babel/parser": "7.23.
|
|
210
|
-
"@babel/traverse": "7.23.
|
|
211
|
-
"@babel/types": "7.23.
|
|
209
|
+
"@babel/parser": "7.23.9",
|
|
210
|
+
"@babel/traverse": "7.23.9",
|
|
211
|
+
"@babel/types": "7.23.9",
|
|
212
212
|
"@csstools/postcss-is-pseudo-class": "4.0.3",
|
|
213
213
|
"@tailwindcss-mangle/shared": "^2.2.2",
|
|
214
214
|
"@weapp-core/escape": "^2.0.0",
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"debug": "4.3.4",
|
|
217
217
|
"htmlparser2": "9.1.0",
|
|
218
218
|
"loader-utils": "2.0.3",
|
|
219
|
-
"lru-cache": "10.
|
|
219
|
+
"lru-cache": "10.2.0",
|
|
220
220
|
"magic-string": "0.30.5",
|
|
221
221
|
"md5": "2.3.0",
|
|
222
222
|
"postcss": "8.4.33",
|
|
@@ -236,8 +236,8 @@
|
|
|
236
236
|
"build:demo": "pnpm demo:del-dist && cross-env NODE_ENV=demo rollup -c rollup.config.ts --configPlugin typescript && pnpm demo:sync-dist",
|
|
237
237
|
"build:tsc": "cross-env NODE_ENV=development tsc --build tsconfig.json",
|
|
238
238
|
"dts": "tsc --emitDeclarationOnly -p tsconfig.dts.json",
|
|
239
|
-
"test": "npm run postinstall && vitest run",
|
|
240
|
-
"test:dev": "vitest",
|
|
239
|
+
"test": "npm run postinstall && cross-env TARGET=1 vitest run",
|
|
240
|
+
"test:dev": "cross-env TARGET=1 vitest",
|
|
241
241
|
"test:ui": "vitest --ui",
|
|
242
242
|
"vitest:coverage": "vitest run --coverage",
|
|
243
243
|
"e2e": "vitest run -c ./vitest.e2e.config.ts",
|