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 CHANGED
@@ -23,16 +23,16 @@
23
23
  > [!NOTE]
24
24
  > 降低开发维护成本,提升开发效率的 `小程序` `tailwindcss` 全方面解决方案
25
25
  >
26
- > `Tailwindcss/Unocss UI` 生成提取器: [`IceStack`](https://ui.icebreaker.top/zh-CN) 已经发布,快来用它管理你的原子化`CSS` 组件吧!
26
+ > 小程序原生工具链 `weapp-vite` 已经发布,使用它改善你的原生小程序开发体验吧,更多详见 [官方文档](https://vite.icebreaker.top/)
27
27
 
28
- \[[国内部署的文档地址](https://weapp-tw.icebreaker.top)\] \| \[[备用Github Page](https://sonofmagic.github.io/weapp-tailwindcss/)\] \| \[[1.x文档]('./v1.md')\]
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` 版本,那你应该使用本插件的 `1.x`/`webpack4` 版本。另外请确保你的 `nodejs` 版本 `>=16.6.0`。目前低于 `16` 的长期维护版本(`偶数版本`) 都已经结束了生命周期,建议安装 `nodejs` 的 `LTS`版本,详见 [nodejs/release](https://github.com/nodejs/release)
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
- ## [现成配置好的各个框架的模板](https://weapp-tw.icebreaker.top/docs/community/templates)
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
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
- const fs = require('fs')
3
- const path = require('path')
2
+ const fs = require('node:fs')
3
+ const path = require('node:path')
4
+
4
5
  const cliPath = path.resolve(__dirname, '../dist/cli.js')
5
6
  if (fs.existsSync(cliPath)) {
6
7
  require(cliPath)
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-BjD225Hm.js');
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-BT2K7ro6.mjs';
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-BjD225Hm.js');
5
+ var options = require('./options-Uv-owbdp.js');
6
6
  require('magic-string');
7
7
  require('@babel/generator');
8
8
  require('@babel/traverse');
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as getOptions } from './options-BT2K7ro6.mjs';
1
+ import { g as getOptions } from './options-GppthPlx.mjs';
2
2
  import 'magic-string';
3
3
  import '@babel/generator';
4
4
  import '@babel/traverse';
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-B8Pxc74h.js');
6
- require('./options-BjD225Hm.js');
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-rwuSO4cM.mjs';
2
- import './options-BT2K7ro6.mjs';
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-BT2K7ro6.mjs';
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-BT2K7ro6.mjs';
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';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var options = require('./options-BjD225Hm.js');
3
+ var options = require('./options-Uv-owbdp.js');
4
4
  var stream = require('node:stream');
5
5
  var node_buffer = require('node:buffer');
6
6
  var index = require('./index-HC-Qkn0i.js');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var options = require('./options-BjD225Hm.js');
3
+ var options = require('./options-Uv-owbdp.js');
4
4
  var index = require('./index-CCbEWRGc.js');
5
5
  var defaults = require('./defaults-DW-EahCC.js');
6
6
  var index$1 = require('./index-HC-Qkn0i.js');
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-_VYyLdJC.js');
6
- var index = require('./index-Ddev8wez.js');
7
- var index$1 = require('./index-B8Pxc74h.js');
8
- require('./options-BjD225Hm.js');
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-vdra_05U.mjs';
2
- export { U as UnifiedViteWeappTailwindcssPlugin } from './index-ClzClhjc.mjs';
3
- export { c as createPlugins } from './index-rwuSO4cM.mjs';
4
- import './options-BT2K7ro6.mjs';
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, variableRegExp } from '@weapp-core/regex';
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 extract(original, reg) {
634
- let match = reg.exec(original);
635
- const sources = [];
636
- while (match !== null) {
637
- const start = match.index;
638
- const end = reg.lastIndex;
639
- sources.push({
640
- start,
641
- end,
642
- raw: match[1],
643
- });
644
- match = reg.exec(original);
645
- }
646
- return sources;
647
- }
648
- function extractSource(original) {
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
- resultArray.push(m.source);
675
- p = m.end;
676
- if (i === sources.length - 1) {
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
- return resultArray.filter(Boolean).join('').trim();
687
- }
688
- else {
689
- return replaceWxml(original, {
690
- keepEOL: false,
691
- escapeMap: options.escapeMap,
692
- mangleContext: options.mangleContext,
693
- ignoreHead: false,
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
- for (const token of tokens) {
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 extract(original, reg) {
665
- let match = reg.exec(original);
666
- const sources = [];
667
- while (match !== null) {
668
- const start = match.index;
669
- const end = reg.lastIndex;
670
- sources.push({
671
- start,
672
- end,
673
- raw: match[1],
674
- });
675
- match = reg.exec(original);
676
- }
677
- return sources;
678
- }
679
- function extractSource(original) {
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
- resultArray.push(m.source);
706
- p = m.end;
707
- if (i === sources.length - 1) {
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
- return resultArray.filter(Boolean).join('').trim();
718
- }
719
- else {
720
- return replace.replaceJs(original, {
721
- keepEOL: false,
722
- escapeMap: options.escapeMap,
723
- mangleContext: options.mangleContext,
724
- ignoreHead: false,
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
- for (const token of tokens) {
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) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var options = require('./options-BjD225Hm.js');
3
+ var options = require('./options-Uv-owbdp.js');
4
4
  var path = require('node:path');
5
5
  var fs = require('node:fs');
6
6
  var index = require('./index-CCbEWRGc.js');
@@ -1,4 +1,4 @@
1
- import { g as getOptions, _ as __awaiter } from './options-BT2K7ro6.mjs';
1
+ import { g as getOptions, _ as __awaiter } from './options-GppthPlx.mjs';
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs';
4
4
  import { b as pluginName } from './index-szMvMylQ.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-Ddev8wez.js');
6
- require('./options-BjD225Hm.js');
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-ClzClhjc.mjs';
2
- import './options-BT2K7ro6.mjs';
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-_VYyLdJC.js');
6
- require('./options-BjD225Hm.js');
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-vdra_05U.mjs';
2
- import './options-BT2K7ro6.mjs';
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-BjD225Hm.js');
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
@@ -1,4 +1,4 @@
1
- import { g as getOptions, _ as __awaiter } from './options-BT2K7ro6.mjs';
1
+ import { g as getOptions, _ as __awaiter } from './options-GppthPlx.mjs';
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs';
4
4
  import { ConcatSource, RawSource } from 'webpack-sources';
@@ -1,2 +1,2 @@
1
1
  export { replaceWxml } from './shared';
2
- export { generateCode, templateReplacer, customTemplateHandler, createTemplateHandler, extractSource } from './utils';
2
+ export { generateCode, templateReplacer, customTemplateHandler, createTemplateHandler } from './utils';
@@ -1,13 +1,10 @@
1
1
  import MagicString from 'magic-string';
2
2
  import type { ItemOrItemArray } from '../reg';
3
- import type { ITemplateHandlerOptions, RawSource } from '../types';
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 extractSource(original: string): RawSource[];
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.0-alpha.0",
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.0",
130
- "@babel/parser": "~7.25.3",
131
- "@babel/traverse": "~7.25.3",
132
- "@babel/types": "~7.25.2",
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.41",
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
  "-------": "-----------",