weapp-tailwindcss 2.4.1 → 2.4.3

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
@@ -20,16 +20,16 @@
20
20
  </a>
21
21
  <br> -->
22
22
 
23
- ![star](https://badgen.net/github/stars/sonofmagic/weapp-tailwindcss-webpack-plugin)
23
+ ![star](https://badgen.net/github/stars/sonofmagic/weapp-tailwindcss)
24
24
  ![dm0](https://badgen.net/npm/dm/weapp-tailwindcss)
25
25
  ![dm1](https://badgen.net/npm/dm/weapp-tailwindcss-webpack-plugin)
26
- ![license](https://badgen.net/npm/license/weapp-tailwindcss-webpack-plugin)
27
- [![test](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/actions/workflows/test.yml)
28
- [![codecov](https://codecov.io/gh/sonofmagic/weapp-tailwindcss-webpack-plugin/branch/main/graph/badge.svg?token=zn05qXYznt)](https://codecov.io/gh/sonofmagic/weapp-tailwindcss-webpack-plugin)
26
+ ![license](https://badgen.net/npm/license/weapp-tailwindcss)
27
+ [![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)
28
+ [![codecov](https://codecov.io/gh/sonofmagic/weapp-tailwindcss/branch/main/graph/badge.svg?token=zn05qXYznt)](https://codecov.io/gh/sonofmagic/weapp-tailwindcss)
29
29
 
30
30
  > `小程序` + `tailwindcss` 全方面解决方案
31
31
 
32
- \[[国内部署的文档地址](https://weapp-tw.icebreaker.top)\] \| \[[备用Github Page](https://sonofmagic.github.io/weapp-tailwindcss-webpack-plugin/)\] \| \[[1.x文档]('./v1.md')\]
32
+ \[[国内部署的文档地址](https://weapp-tw.icebreaker.top)\] \| \[[备用Github Page](https://sonofmagic.github.io/weapp-tailwindcss/)\] \| \[[1.x文档]('./v1.md')\]
33
33
 
34
34
  - [Tips](#tips)
35
35
  - [特性](#特性)
@@ -84,7 +84,7 @@
84
84
 
85
85
  <!-- ## [js文件内容中taiwlindcss类名的精确转化与忽略策略](https://weapp-tw.icebreaker.top/docs/options/comments) -->
86
86
 
87
- ## [配置项参考](https://weapp-tw.icebreaker.top/docs/options/)
87
+ ## [配置项参考](https://weapp-tw.icebreaker.top/docs/api/interfaces/UserDefinedOptions)
88
88
 
89
89
  ## [使用tailwindcss任意值(arbitrary values)](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values)
90
90
 
@@ -122,7 +122,7 @@
122
122
 
123
123
  #### 原生小程序开发模板
124
124
 
125
- [weapp-tailwindcss-gulp-template(gulp打包)](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/tree/main/demo/gulp-app)
125
+ [weapp-tailwindcss-gulp-template(gulp打包)](https://github.com/sonofmagic/weapp-tailwindcss/tree/main/demo/gulp-app)
126
126
 
127
127
  [weapp-native-mina-tailwindcss-template(webpack打包)](https://github.com/sonofmagic/weapp-native-mina-tailwindcss-template)
128
128
 
@@ -138,4 +138,4 @@
138
138
 
139
139
  目前这个插件正在快速的开发中,如果遇到 `Bug` 或者想提出 `Issue`
140
140
 
141
- [欢迎提交到此处](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues)
141
+ [欢迎提交到此处](https://github.com/sonofmagic/weapp-tailwindcss/issues)
package/dist/cli.js CHANGED
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var options = require('./options-b3e419f1.js');
3
+ var options = require('./options-2e71e6b3.js');
4
4
  require('micromatch');
5
5
  require('@babel/types');
6
6
  require('@babel/generator');
7
7
  require('@babel/parser');
8
8
  require('@babel/traverse');
9
9
  require('./replace.js');
10
- require('./shared-823d1fc1.js');
11
- require('tailwindcss-mangle-shared');
10
+ require('./shared-cdb5ee55.js');
12
11
  require('postcss');
13
- require('./postcss-06f57f3f.js');
12
+ require('./postcss-b8952a11.js');
14
13
  require('postcss-selector-parser');
15
14
  require('@csstools/postcss-is-pseudo-class');
16
15
  require('node:path');
17
16
  require('node:fs');
18
17
  require('semver');
19
18
  require('tailwindcss-patch');
19
+ require('tailwindcss-mangle-shared');
20
20
 
21
21
  const args = process.argv.slice(2);
22
22
  if (args[0] === 'patch') {
package/dist/cli.mjs CHANGED
@@ -1,20 +1,20 @@
1
- import { g as getOptions, c as createPatch } from './options-3578215d.mjs';
1
+ import { g as getOptions, c as createPatch } from './options-a2ba3653.mjs';
2
2
  import 'micromatch';
3
3
  import '@babel/types';
4
4
  import '@babel/generator';
5
5
  import '@babel/parser';
6
6
  import '@babel/traverse';
7
7
  import './replace.mjs';
8
- import './shared-497eda3c.mjs';
9
- import 'tailwindcss-mangle-shared';
8
+ import './shared-fc50603a.mjs';
10
9
  import 'postcss';
11
- import './postcss-564aef44.mjs';
10
+ import './postcss-15e2ef2d.mjs';
12
11
  import 'postcss-selector-parser';
13
12
  import '@csstools/postcss-is-pseudo-class';
14
13
  import 'node:path';
15
14
  import 'node:fs';
16
15
  import 'semver';
17
16
  import 'tailwindcss-patch';
17
+ import 'tailwindcss-mangle-shared';
18
18
 
19
19
  const args = process.argv.slice(2);
20
20
  if (args[0] === 'patch') {
@@ -1,3 +1,3 @@
1
1
  export declare const validateFilterRE: RegExp;
2
2
  export declare function isValidSelector(selector?: string): selector is string;
3
- export declare const splitCode: (code: string) => string[];
3
+ export declare const splitCode: (code: string, allowDoubleQuotes?: boolean) => string[];
package/dist/gulp.js CHANGED
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var stream = require('node:stream');
6
- var options = require('./options-b3e419f1.js');
7
- var shared = require('./shared-823d1fc1.js');
6
+ var options = require('./options-2e71e6b3.js');
8
7
  require('micromatch');
9
8
  require('@babel/types');
10
9
  require('@babel/generator');
11
10
  require('@babel/parser');
12
11
  require('@babel/traverse');
13
12
  require('./replace.js');
13
+ require('./shared-cdb5ee55.js');
14
14
  require('postcss');
15
- require('./postcss-06f57f3f.js');
15
+ require('./postcss-b8952a11.js');
16
16
  require('postcss-selector-parser');
17
17
  require('@csstools/postcss-is-pseudo-class');
18
18
  require('node:path');
@@ -30,17 +30,16 @@ function createPlugins(options$1 = {}) {
30
30
  if (options$1.customReplaceDictionary === undefined) {
31
31
  options$1.customReplaceDictionary = 'simple';
32
32
  }
33
- const opts = options.getOptions(options$1, ['patch', 'style', 'templete', 'js']);
34
- const { templeteHandler, styleHandler, patch, jsHandler, mangle } = opts;
33
+ const opts = options.getOptions(options$1);
34
+ const { templeteHandler, styleHandler, patch, jsHandler, setMangleRuntimeSet } = opts;
35
35
  let set = new Set();
36
36
  patch === null || patch === void 0 ? void 0 : patch();
37
- shared.initStore(mangle);
38
37
  const twPatcher = options.createTailwindcssPatcher();
39
38
  function transformWxss() {
40
39
  const transformStream = new Transform({ objectMode: true });
41
40
  transformStream._transform = function (file, encoding, callback) {
42
41
  set = twPatcher.getClassSet();
43
- shared.setRuntimeSet(set);
42
+ setMangleRuntimeSet(set);
44
43
  const error = null;
45
44
  if (file.contents) {
46
45
  const code = styleHandler(file.contents.toString(), {
package/dist/gulp.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import stream from 'node:stream';
2
- import { g as getOptions, a as createTailwindcssPatcher } from './options-3578215d.mjs';
3
- import { c as initStore, d as setRuntimeSet } from './shared-497eda3c.mjs';
2
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-a2ba3653.mjs';
4
3
  import 'micromatch';
5
4
  import '@babel/types';
6
5
  import '@babel/generator';
7
6
  import '@babel/parser';
8
7
  import '@babel/traverse';
9
8
  import './replace.mjs';
9
+ import './shared-fc50603a.mjs';
10
10
  import 'postcss';
11
- import './postcss-564aef44.mjs';
11
+ import './postcss-15e2ef2d.mjs';
12
12
  import 'postcss-selector-parser';
13
13
  import '@csstools/postcss-is-pseudo-class';
14
14
  import 'node:path';
@@ -22,17 +22,16 @@ function createPlugins(options = {}) {
22
22
  if (options.customReplaceDictionary === undefined) {
23
23
  options.customReplaceDictionary = 'simple';
24
24
  }
25
- const opts = getOptions(options, ['patch', 'style', 'templete', 'js']);
26
- const { templeteHandler, styleHandler, patch, jsHandler, mangle } = opts;
25
+ const opts = getOptions(options);
26
+ const { templeteHandler, styleHandler, patch, jsHandler, setMangleRuntimeSet } = opts;
27
27
  let set = new Set();
28
28
  patch === null || patch === void 0 ? void 0 : patch();
29
- initStore(mangle);
30
29
  const twPatcher = createTailwindcssPatcher();
31
30
  function transformWxss() {
32
31
  const transformStream = new Transform({ objectMode: true });
33
32
  transformStream._transform = function (file, encoding, callback) {
34
33
  set = twPatcher.getClassSet();
35
- setRuntimeSet(set);
34
+ setMangleRuntimeSet(set);
36
35
  const error = null;
37
36
  if (file.contents) {
38
37
  const code = styleHandler(file.contents.toString(), {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './webpack';
2
2
  export * from './vite';
3
3
  export * from './gulp';
4
+ export * from './types';
package/dist/index.js CHANGED
@@ -5,23 +5,23 @@ 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-b3e419f1.js');
8
+ require('./options-2e71e6b3.js');
9
9
  require('micromatch');
10
10
  require('@babel/types');
11
11
  require('@babel/generator');
12
12
  require('@babel/parser');
13
13
  require('@babel/traverse');
14
14
  require('./replace.js');
15
- require('./shared-823d1fc1.js');
16
- require('tailwindcss-mangle-shared');
15
+ require('./shared-cdb5ee55.js');
17
16
  require('postcss');
18
- require('./postcss-06f57f3f.js');
17
+ require('./postcss-b8952a11.js');
19
18
  require('postcss-selector-parser');
20
19
  require('@csstools/postcss-is-pseudo-class');
21
20
  require('node:path');
22
21
  require('node:fs');
23
22
  require('semver');
24
23
  require('tailwindcss-patch');
24
+ require('tailwindcss-mangle-shared');
25
25
  require('node:stream');
26
26
 
27
27
 
package/dist/index.mjs CHANGED
@@ -1,21 +1,21 @@
1
1
  export { UnifiedWebpackPluginV5 } from './webpack.mjs';
2
2
  export { UnifiedViteWeappTailwindcssPlugin } from './vite.mjs';
3
3
  export { createPlugins } from './gulp.mjs';
4
- import './options-3578215d.mjs';
4
+ import './options-a2ba3653.mjs';
5
5
  import 'micromatch';
6
6
  import '@babel/types';
7
7
  import '@babel/generator';
8
8
  import '@babel/parser';
9
9
  import '@babel/traverse';
10
10
  import './replace.mjs';
11
- import './shared-497eda3c.mjs';
12
- import 'tailwindcss-mangle-shared';
11
+ import './shared-fc50603a.mjs';
13
12
  import 'postcss';
14
- import './postcss-564aef44.mjs';
13
+ import './postcss-15e2ef2d.mjs';
15
14
  import 'postcss-selector-parser';
16
15
  import '@csstools/postcss-is-pseudo-class';
17
16
  import 'node:path';
18
17
  import 'node:fs';
19
18
  import 'semver';
20
19
  import 'tailwindcss-patch';
20
+ import 'tailwindcss-mangle-shared';
21
21
  import 'node:stream';
@@ -0,0 +1,8 @@
1
+ import type { UserDefinedOptions, IMangleScopeContext } from "../types";
2
+ export declare const defaultMangleContext: IMangleScopeContext;
3
+ export declare function useMangleStore(): {
4
+ mangleContext: IMangleScopeContext;
5
+ resetMangle: () => IMangleScopeContext;
6
+ initMangle: (options: UserDefinedOptions['mangle']) => void;
7
+ setMangleRuntimeSet: (runtimeSet: Set<string>) => void;
8
+ };