weapp-tailwindcss 3.5.0-alpha.0 → 3.5.1
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 +10 -5
- package/bin/weapp-tailwindcss.js +3 -2
- 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-ClzClhjc.mjs → index-BmK79Rz9.mjs} +1 -1
- package/dist/{index-rwuSO4cM.mjs → index-CvOeCzMu.mjs} +1 -1
- package/dist/{index-B8Pxc74h.js → index-Dm02XDmu.js} +1 -1
- package/dist/{index-Ddev8wez.js → index-OCXtSR4S.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{options-BT2K7ro6.mjs → options-GppthPlx.mjs} +30 -61
- package/dist/{options-BjD225Hm.js → options-Uv-owbdp.js} +29 -60
- package/dist/{v5-_VYyLdJC.js → v5-C_U1pkH8.js} +1 -1
- package/dist/{v5-vdra_05U.mjs → v5-DqFFl6uq.mjs} +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/dist/wxml/index.d.ts +1 -1
- package/dist/wxml/utils.d.ts +2 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
> [!NOTE]
|
|
24
24
|
> 降低开发维护成本,提升开发效率的 `小程序` `tailwindcss` 全方面解决方案
|
|
25
25
|
>
|
|
26
|
-
>
|
|
26
|
+
> 小程序原生工具链 `weapp-vite` 已经发布,使用它改善你的原生小程序开发体验吧,更多详见 [官方文档](https://vite.icebreaker.top/)
|
|
27
27
|
|
|
28
|
-
\[[
|
|
28
|
+
\[[文档地址](https://weapp-tw.icebreaker.top)\] \| \[[备用文档地址](https://sonofmagic.github.io/weapp-tailwindcss/)\] \| \[[1.x文档]('./v1.md')\]
|
|
29
29
|
|
|
30
30
|
- [特性](#特性)
|
|
31
31
|
- [版本对应](#版本对应)
|
|
32
32
|
- [安装与使用方式](#安装与使用方式)
|
|
33
33
|
- [生态和解决方案](#生态和解决方案)
|
|
34
34
|
- [常见问题](#常见问题)
|
|
35
|
-
- [
|
|
35
|
+
- [各个框架的模板](#各个框架的模板)
|
|
36
36
|
- [旧版本迁移指南](#旧版本迁移指南)
|
|
37
37
|
- [配置项参考](#配置项参考)
|
|
38
38
|
- [变更日志](#变更日志)
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
- [License](#license)
|
|
42
42
|
- [Star History](#star-history)
|
|
43
43
|
- [Related projects](#related-projects)
|
|
44
|
+
- [weapp-vite](#weapp-vite)
|
|
44
45
|
- [IceStack](#icestack)
|
|
45
46
|
- [weapp-ide-cli](#weapp-ide-cli)
|
|
46
47
|
- [weapp-pandacss](#weapp-pandacss)
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
|
|
62
63
|
目前,`weapp-tailwindcss` 的 `2.x` 和 `3.x` 支持最新版本的 `tailwindcss v3.x.x` 版本和 `webpack5`,`webpack4`, `vite` 和 `gulp`。从 `3.2.0` 开始,`weapp-tailwindcss` 支持最原生的小程序开发方式。
|
|
63
64
|
|
|
64
|
-
> 如果你还在使用 `tailwindcss@2`
|
|
65
|
+
> 如果你还在使用 `tailwindcss@2` 版本,那你应该使用从 `weapp-tailwindcss/webpack4` 导出的本插件的 `postcss7` `webpack4` 版本。另外请确保你的 `nodejs` 版本 `>=16.6.0`。目前低于 `16` 的长期维护版本(`偶数版本`) 都已经结束了生命周期,建议安装 `nodejs` 的 `LTS` 版本,详见 [nodejs/release](https://github.com/nodejs/release)
|
|
65
66
|
|
|
66
67
|
## [安装与使用方式](https://weapp-tw.icebreaker.top/docs/quick-start/install)
|
|
67
68
|
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
|
|
70
71
|
## [常见问题](https://weapp-tw.icebreaker.top/docs/issues/)
|
|
71
72
|
|
|
72
|
-
## [
|
|
73
|
+
## [各个框架的模板](https://weapp-tw.icebreaker.top/docs/community/templates)
|
|
73
74
|
|
|
74
75
|
## [旧版本迁移指南](https://weapp-tw.icebreaker.top/docs/migrations/v2)
|
|
75
76
|
|
|
@@ -104,6 +105,10 @@
|
|
|
104
105
|
|
|
105
106
|
## Related projects
|
|
106
107
|
|
|
108
|
+
### weapp-vite
|
|
109
|
+
|
|
110
|
+
[weapp-vite](https://vite.icebreaker.top/): 把现代化的开发模式带入小程序开发!
|
|
111
|
+
|
|
107
112
|
### IceStack
|
|
108
113
|
|
|
109
114
|
[IceStack](https://github.com/sonofmagic/icestack): ❤️ IceStack, Web UI for Mobile, PC, open-source Css component library generator
|
package/bin/weapp-tailwindcss.js
CHANGED
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var process = require('node:process');
|
|
4
4
|
var semver = require('semver');
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-Uv-owbdp.js');
|
|
6
6
|
var index = require('./index-CCbEWRGc.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('@babel/generator');
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import semver from 'semver';
|
|
3
|
-
import { g as getOptions } from './options-
|
|
3
|
+
import { g as getOptions } from './options-GppthPlx.mjs';
|
|
4
4
|
import { W as WEAPP_TW_REQUIRED_NODE_VERSION } from './index-szMvMylQ.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import '@babel/generator';
|
package/dist/core.js
CHANGED
package/dist/core.mjs
CHANGED
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-Dm02XDmu.js');
|
|
6
|
+
require('./options-Uv-owbdp.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('@babel/generator');
|
|
9
9
|
require('@babel/traverse');
|
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-CvOeCzMu.mjs';
|
|
2
|
+
import './options-GppthPlx.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import '@babel/generator';
|
|
5
5
|
import '@babel/traverse';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-GppthPlx.mjs';
|
|
2
2
|
import { v as vitePluginName } from './index-szMvMylQ.mjs';
|
|
3
3
|
import { g as getGroupedEntries } from './defaults-w3rlKQwe.mjs';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-GppthPlx.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
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-C_U1pkH8.js');
|
|
6
|
+
var index = require('./index-OCXtSR4S.js');
|
|
7
|
+
var index$1 = require('./index-Dm02XDmu.js');
|
|
8
|
+
require('./options-Uv-owbdp.js');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('@babel/generator');
|
|
11
11
|
require('@babel/traverse');
|
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-DqFFl6uq.mjs';
|
|
2
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-BmK79Rz9.mjs';
|
|
3
|
+
export { c as createPlugins } from './index-CvOeCzMu.mjs';
|
|
4
|
+
import './options-GppthPlx.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import '@babel/generator';
|
|
7
7
|
import '@babel/traverse';
|
|
@@ -6,7 +6,7 @@ import '@weapp-core/escape';
|
|
|
6
6
|
import { jsStringEscape } from '@ast-core/escape';
|
|
7
7
|
import { d as defuOverrideArray, a as defaultOptions, i as isMap } from './defaults-w3rlKQwe.mjs';
|
|
8
8
|
import { replaceJs as replaceWxml } from './replace.mjs';
|
|
9
|
-
import { escapeStringRegexp
|
|
9
|
+
import { escapeStringRegexp } from '@weapp-core/regex';
|
|
10
10
|
import { ClassGenerator, defaultMangleClassFilter } from '@tailwindcss-mangle/shared';
|
|
11
11
|
import { LRUCache } from 'lru-cache';
|
|
12
12
|
import md5 from 'md5';
|
|
@@ -32,7 +32,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
32
32
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
33
33
|
PERFORMANCE OF THIS SOFTWARE.
|
|
34
34
|
***************************************************************************** */
|
|
35
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
35
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
@@ -630,78 +630,47 @@ function generateCode(match, options = {}) {
|
|
|
630
630
|
return match;
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
return extract(original, variableRegExp);
|
|
650
|
-
}
|
|
651
|
-
function handleEachClassFragment(original, options = {}) {
|
|
652
|
-
const sources = extractSource(original);
|
|
653
|
-
if (sources.length > 0) {
|
|
654
|
-
const resultArray = [];
|
|
655
|
-
let p = 0;
|
|
656
|
-
for (let i = 0; i < sources.length; i++) {
|
|
657
|
-
const m = sources[i];
|
|
658
|
-
const before = original.slice(p, m.start);
|
|
659
|
-
resultArray.push(replaceWxml(before, {
|
|
660
|
-
keepEOL: true,
|
|
661
|
-
escapeMap: options.escapeMap,
|
|
662
|
-
mangleContext: options.mangleContext,
|
|
663
|
-
ignoreHead: p > 0,
|
|
664
|
-
}));
|
|
665
|
-
p = m.start;
|
|
666
|
-
if (m.raw.trim().length > 0) {
|
|
667
|
-
const code = generateCode(m.raw, options);
|
|
668
|
-
const source = `{{${code}}}`;
|
|
669
|
-
m.source = source;
|
|
670
|
-
}
|
|
671
|
-
else {
|
|
672
|
-
m.source = '';
|
|
633
|
+
function handleEachClassFragment(ms, tokens, options = {}) {
|
|
634
|
+
for (const token of tokens) {
|
|
635
|
+
let p = token.start;
|
|
636
|
+
if (token.expressions.length > 0) {
|
|
637
|
+
for (const exp of token.expressions) {
|
|
638
|
+
if (exp.start > token.start) {
|
|
639
|
+
ms.update(p, exp.start, replaceWxml(ms.slice(p, exp.start), {
|
|
640
|
+
keepEOL: true,
|
|
641
|
+
escapeMap: options.escapeMap,
|
|
642
|
+
mangleContext: options.mangleContext,
|
|
643
|
+
ignoreHead: p > 0,
|
|
644
|
+
}));
|
|
645
|
+
}
|
|
646
|
+
const code = `{{${generateCode(exp.value.slice(2, -2), options)}}}`;
|
|
647
|
+
ms.update(exp.start, exp.end, code);
|
|
648
|
+
p = exp.end;
|
|
673
649
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
const after = original.slice(m.end);
|
|
678
|
-
resultArray.push(replaceWxml(after, {
|
|
679
|
-
keepEOL: true,
|
|
650
|
+
if (token.end > p) {
|
|
651
|
+
ms.update(p, token.end, replaceWxml(ms.slice(p, token.end), {
|
|
652
|
+
keepEOL: false,
|
|
680
653
|
escapeMap: options.escapeMap,
|
|
681
654
|
mangleContext: options.mangleContext,
|
|
682
655
|
ignoreHead: true,
|
|
683
656
|
}));
|
|
684
657
|
}
|
|
685
658
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
});
|
|
659
|
+
else {
|
|
660
|
+
ms.update(token.start, token.end, replaceWxml(token.value, {
|
|
661
|
+
keepEOL: false,
|
|
662
|
+
escapeMap: options.escapeMap,
|
|
663
|
+
mangleContext: options.mangleContext,
|
|
664
|
+
ignoreHead: false,
|
|
665
|
+
}));
|
|
666
|
+
}
|
|
695
667
|
}
|
|
696
668
|
}
|
|
697
669
|
function templateReplacer(original, options = {}) {
|
|
698
670
|
const ms = new MagicString(original);
|
|
699
671
|
const tokenizer = new Tokenizer();
|
|
700
672
|
const tokens = tokenizer.run(ms.original);
|
|
701
|
-
|
|
702
|
-
const target = handleEachClassFragment(token.value, options);
|
|
703
|
-
ms.update(token.start, token.end, target);
|
|
704
|
-
}
|
|
673
|
+
handleEachClassFragment(ms, tokens, options);
|
|
705
674
|
return ms.toString();
|
|
706
675
|
}
|
|
707
676
|
function regTest(reg, str) {
|
|
@@ -63,7 +63,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
63
63
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
64
64
|
PERFORMANCE OF THIS SOFTWARE.
|
|
65
65
|
***************************************************************************** */
|
|
66
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
66
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
@@ -661,78 +661,47 @@ function generateCode(match, options = {}) {
|
|
|
661
661
|
return match;
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
return extract(original, regex.variableRegExp);
|
|
681
|
-
}
|
|
682
|
-
function handleEachClassFragment(original, options = {}) {
|
|
683
|
-
const sources = extractSource(original);
|
|
684
|
-
if (sources.length > 0) {
|
|
685
|
-
const resultArray = [];
|
|
686
|
-
let p = 0;
|
|
687
|
-
for (let i = 0; i < sources.length; i++) {
|
|
688
|
-
const m = sources[i];
|
|
689
|
-
const before = original.slice(p, m.start);
|
|
690
|
-
resultArray.push(replace.replaceJs(before, {
|
|
691
|
-
keepEOL: true,
|
|
692
|
-
escapeMap: options.escapeMap,
|
|
693
|
-
mangleContext: options.mangleContext,
|
|
694
|
-
ignoreHead: p > 0,
|
|
695
|
-
}));
|
|
696
|
-
p = m.start;
|
|
697
|
-
if (m.raw.trim().length > 0) {
|
|
698
|
-
const code = generateCode(m.raw, options);
|
|
699
|
-
const source = `{{${code}}}`;
|
|
700
|
-
m.source = source;
|
|
701
|
-
}
|
|
702
|
-
else {
|
|
703
|
-
m.source = '';
|
|
664
|
+
function handleEachClassFragment(ms, tokens, options = {}) {
|
|
665
|
+
for (const token of tokens) {
|
|
666
|
+
let p = token.start;
|
|
667
|
+
if (token.expressions.length > 0) {
|
|
668
|
+
for (const exp of token.expressions) {
|
|
669
|
+
if (exp.start > token.start) {
|
|
670
|
+
ms.update(p, exp.start, replace.replaceJs(ms.slice(p, exp.start), {
|
|
671
|
+
keepEOL: true,
|
|
672
|
+
escapeMap: options.escapeMap,
|
|
673
|
+
mangleContext: options.mangleContext,
|
|
674
|
+
ignoreHead: p > 0,
|
|
675
|
+
}));
|
|
676
|
+
}
|
|
677
|
+
const code = `{{${generateCode(exp.value.slice(2, -2), options)}}}`;
|
|
678
|
+
ms.update(exp.start, exp.end, code);
|
|
679
|
+
p = exp.end;
|
|
704
680
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
const after = original.slice(m.end);
|
|
709
|
-
resultArray.push(replace.replaceJs(after, {
|
|
710
|
-
keepEOL: true,
|
|
681
|
+
if (token.end > p) {
|
|
682
|
+
ms.update(p, token.end, replace.replaceJs(ms.slice(p, token.end), {
|
|
683
|
+
keepEOL: false,
|
|
711
684
|
escapeMap: options.escapeMap,
|
|
712
685
|
mangleContext: options.mangleContext,
|
|
713
686
|
ignoreHead: true,
|
|
714
687
|
}));
|
|
715
688
|
}
|
|
716
689
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
});
|
|
690
|
+
else {
|
|
691
|
+
ms.update(token.start, token.end, replace.replaceJs(token.value, {
|
|
692
|
+
keepEOL: false,
|
|
693
|
+
escapeMap: options.escapeMap,
|
|
694
|
+
mangleContext: options.mangleContext,
|
|
695
|
+
ignoreHead: false,
|
|
696
|
+
}));
|
|
697
|
+
}
|
|
726
698
|
}
|
|
727
699
|
}
|
|
728
700
|
function templateReplacer(original, options = {}) {
|
|
729
701
|
const ms = new MagicString__default["default"](original);
|
|
730
702
|
const tokenizer = new Tokenizer();
|
|
731
703
|
const tokens = tokenizer.run(ms.original);
|
|
732
|
-
|
|
733
|
-
const target = handleEachClassFragment(token.value, options);
|
|
734
|
-
ms.update(token.start, token.end, target);
|
|
735
|
-
}
|
|
704
|
+
handleEachClassFragment(ms, tokens, options);
|
|
736
705
|
return ms.toString();
|
|
737
706
|
}
|
|
738
707
|
function regTest(reg, str) {
|
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-OCXtSR4S.js');
|
|
6
|
+
require('./options-Uv-owbdp.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('@babel/generator');
|
|
9
9
|
require('@babel/traverse');
|
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-BmK79Rz9.mjs';
|
|
2
|
+
import './options-GppthPlx.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import '@babel/generator';
|
|
5
5
|
import '@babel/traverse';
|
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-C_U1pkH8.js');
|
|
6
|
+
require('./options-Uv-owbdp.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('@babel/generator');
|
|
9
9
|
require('@babel/traverse');
|
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-DqFFl6uq.mjs';
|
|
2
|
+
import './options-GppthPlx.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import '@babel/generator';
|
|
5
5
|
import '@babel/traverse';
|
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-Uv-owbdp.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
package/dist/wxml/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { replaceWxml } from './shared';
|
|
2
|
-
export { generateCode, templateReplacer, customTemplateHandler, createTemplateHandler
|
|
2
|
+
export { generateCode, templateReplacer, customTemplateHandler, createTemplateHandler } from './utils';
|
package/dist/wxml/utils.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import MagicString from 'magic-string';
|
|
2
2
|
import type { ItemOrItemArray } from '../reg';
|
|
3
|
-
import type { ITemplateHandlerOptions
|
|
3
|
+
import type { ITemplateHandlerOptions } from '../types';
|
|
4
4
|
import type { Token } from './Tokenizer';
|
|
5
5
|
export declare function generateCode(match: string, options?: ITemplateHandlerOptions): string;
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function handleEachClassFragment(original: string, options?: ITemplateHandlerOptions): string;
|
|
8
|
-
export declare function handleEachClassFragment2(ms: MagicString, tokens: Token[], options?: ITemplateHandlerOptions): void;
|
|
6
|
+
export declare function handleEachClassFragment(ms: MagicString, tokens: Token[], options?: ITemplateHandlerOptions): void;
|
|
9
7
|
export declare function templateReplacer(original: string, options?: ITemplateHandlerOptions): string;
|
|
10
|
-
export declare function templateReplacer2(original: string, options?: ITemplateHandlerOptions): string;
|
|
11
8
|
export declare function isPropsMatch(props: ItemOrItemArray<string | RegExp>, attr: string): boolean;
|
|
12
9
|
export declare function customTemplateHandler(rawSource: string, options: Required<ITemplateHandlerOptions>): Promise<string>;
|
|
13
10
|
export declare function createTemplateHandler(options?: Omit<ITemplateHandlerOptions, 'runtimeSet'>): (rawSource: string, opt?: Pick<ITemplateHandlerOptions, "runtimeSet">) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "SonOfMagic <qq1324318532@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
},
|
|
127
127
|
"dependencies": {
|
|
128
128
|
"@ast-core/escape": "~1.0.1",
|
|
129
|
-
"@babel/generator": "~7.25.
|
|
130
|
-
"@babel/parser": "~7.25.
|
|
131
|
-
"@babel/traverse": "~7.25.
|
|
132
|
-
"@babel/types": "~7.25.
|
|
129
|
+
"@babel/generator": "~7.25.6",
|
|
130
|
+
"@babel/parser": "~7.25.6",
|
|
131
|
+
"@babel/traverse": "~7.25.6",
|
|
132
|
+
"@babel/types": "~7.25.6",
|
|
133
133
|
"@csstools/postcss-is-pseudo-class": "~4.0.8",
|
|
134
134
|
"@tailwindcss-mangle/shared": "~3.0.0",
|
|
135
135
|
"@weapp-core/escape": "~2.1.0",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"lru-cache": "10.4.3",
|
|
141
141
|
"magic-string": "0.30.11",
|
|
142
142
|
"md5": "2.3.0",
|
|
143
|
-
"postcss": "~8.4.
|
|
143
|
+
"postcss": "~8.4.42",
|
|
144
144
|
"postcss-rem-to-responsive-pixel": "~6.0.1",
|
|
145
145
|
"postcss-selector-parser": "~6.1.2",
|
|
146
146
|
"semver": "~7.6.2",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"ls:pack": "npm pack --dry-run",
|
|
163
163
|
"cli:patch": "node bin/weapp-tailwindcss.js patch",
|
|
164
164
|
"release": "node scripts/release.js",
|
|
165
|
-
"generate:readme": "tsx scripts/readme/write.ts",
|
|
165
|
+
"generate:readme": "tsx --watch scripts/readme/write.ts watch scripts/readme/**/*",
|
|
166
166
|
"lint": "eslint .",
|
|
167
167
|
"lint:fix": "eslint ./src --fix",
|
|
168
168
|
"-------": "-----------",
|