weapp-tailwindcss 2.6.0 → 2.6.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/dist/vite.js CHANGED
@@ -2,15 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-487394fa.js');
6
- var postcss = require('./postcss-b53e9504.js');
5
+ var options = require('./options-c5e1d1b4.js');
6
+ var postcss = require('./postcss-4c88cd6d.js');
7
+ var defaults = require('./defaults-d79e9245.js');
7
8
  require('micromatch');
8
9
  require('@babel/types');
9
10
  require('@babel/generator');
10
11
  require('@babel/parser');
11
12
  require('@babel/traverse');
12
13
  require('./replace.js');
13
- require('./shared-ae7dd073.js');
14
+ require('./dic-05980807.js');
15
+ require('./shared-4eed0e5c.js');
14
16
  require('postcss');
15
17
  require('@csstools/postcss-is-pseudo-class');
16
18
  require('node:path');
@@ -25,7 +27,7 @@ function UnifiedViteWeappTailwindcssPlugin(options$1 = {}) {
25
27
  options$1.customReplaceDictionary = 'simple';
26
28
  }
27
29
  const opts = options.getOptions(options$1);
28
- const { disabled, onEnd, onLoad, onStart, onUpdate, templeteHandler, styleHandler, patch, jsHandler, mainCssChunkMatcher, appType, setMangleRuntimeSet } = opts;
30
+ const { disabled, onEnd, onLoad, onStart, onUpdate, templateHandler, styleHandler, patch, jsHandler, mainCssChunkMatcher, appType, setMangleRuntimeSet } = opts;
29
31
  if (disabled) {
30
32
  return;
31
33
  }
@@ -40,14 +42,14 @@ function UnifiedViteWeappTailwindcssPlugin(options$1 = {}) {
40
42
  },
41
43
  generateBundle(opt, bundle, isWrite) {
42
44
  const entries = Object.entries(bundle);
43
- const groupedEntries = options.getGroupedEntries(entries, opts);
45
+ const groupedEntries = defaults.getGroupedEntries(entries, opts);
44
46
  const runtimeSet = twPatcher.getClassSet();
45
47
  setMangleRuntimeSet(runtimeSet);
46
48
  if (Array.isArray(groupedEntries.html)) {
47
49
  for (let i = 0; i < groupedEntries.html.length; i++) {
48
50
  const [file, originalSource] = groupedEntries.html[i];
49
51
  const oldVal = originalSource.source.toString();
50
- originalSource.source = templeteHandler(oldVal, {
52
+ originalSource.source = templateHandler(oldVal, {
51
53
  runtimeSet
52
54
  });
53
55
  onUpdate(file, oldVal, originalSource.source);
package/dist/vite.mjs CHANGED
@@ -1,12 +1,14 @@
1
- import { g as getOptions, a as createTailwindcssPatcher, b as getGroupedEntries } from './options-f7b71f03.mjs';
2
- import { v as vitePluginName } from './postcss-760298ba.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-244dcceb.mjs';
2
+ import { v as vitePluginName } from './postcss-99efb521.mjs';
3
+ import { g as getGroupedEntries } from './defaults-c397b5f9.mjs';
3
4
  import 'micromatch';
4
5
  import '@babel/types';
5
6
  import '@babel/generator';
6
7
  import '@babel/parser';
7
8
  import '@babel/traverse';
8
9
  import './replace.mjs';
9
- import './shared-7c88fb94.mjs';
10
+ import './dic-3790a3a4.mjs';
11
+ import './shared-686bfc32.mjs';
10
12
  import 'postcss';
11
13
  import '@csstools/postcss-is-pseudo-class';
12
14
  import 'node:path';
@@ -21,7 +23,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
21
23
  options.customReplaceDictionary = 'simple';
22
24
  }
23
25
  const opts = getOptions(options);
24
- const { disabled, onEnd, onLoad, onStart, onUpdate, templeteHandler, styleHandler, patch, jsHandler, mainCssChunkMatcher, appType, setMangleRuntimeSet } = opts;
26
+ const { disabled, onEnd, onLoad, onStart, onUpdate, templateHandler, styleHandler, patch, jsHandler, mainCssChunkMatcher, appType, setMangleRuntimeSet } = opts;
25
27
  if (disabled) {
26
28
  return;
27
29
  }
@@ -43,7 +45,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
43
45
  for (let i = 0; i < groupedEntries.html.length; i++) {
44
46
  const [file, originalSource] = groupedEntries.html[i];
45
47
  const oldVal = originalSource.source.toString();
46
- originalSource.source = templeteHandler(oldVal, {
48
+ originalSource.source = templateHandler(oldVal, {
47
49
  runtimeSet
48
50
  });
49
51
  onUpdate(file, oldVal, originalSource.source);
package/dist/webpack.js CHANGED
@@ -4,15 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var path = require('node:path');
6
6
  var fs = require('node:fs');
7
- var options = require('./options-487394fa.js');
8
- var postcss = require('./postcss-b53e9504.js');
7
+ var options = require('./options-c5e1d1b4.js');
8
+ var postcss = require('./postcss-4c88cd6d.js');
9
+ var defaults = require('./defaults-d79e9245.js');
9
10
  require('micromatch');
10
11
  require('@babel/types');
11
12
  require('@babel/generator');
12
13
  require('@babel/parser');
13
14
  require('@babel/traverse');
14
15
  require('./replace.js');
15
- require('./shared-ae7dd073.js');
16
+ require('./dic-05980807.js');
17
+ require('./shared-4eed0e5c.js');
16
18
  require('postcss');
17
19
  require('@csstools/postcss-is-pseudo-class');
18
20
  require('semver');
@@ -34,7 +36,7 @@ class UnifiedWebpackPluginV5 {
34
36
  this.appType = this.options.appType;
35
37
  }
36
38
  apply(compiler) {
37
- const { mainCssChunkMatcher, disabled, onLoad, onUpdate, onEnd, onStart, styleHandler, patch, templeteHandler, jsHandler, setMangleRuntimeSet } = this.options;
39
+ const { mainCssChunkMatcher, disabled, onLoad, onUpdate, onEnd, onStart, styleHandler, patch, templateHandler, jsHandler, setMangleRuntimeSet } = this.options;
38
40
  if (disabled) {
39
41
  return;
40
42
  }
@@ -71,14 +73,14 @@ class UnifiedWebpackPluginV5 {
71
73
  }, (assets) => {
72
74
  onStart();
73
75
  const entries = Object.entries(assets);
74
- const groupedEntries = options.getGroupedEntries(entries, this.options);
76
+ const groupedEntries = defaults.getGroupedEntries(entries, this.options);
75
77
  const runtimeSet = getClassSet();
76
78
  setMangleRuntimeSet(runtimeSet);
77
79
  if (Array.isArray(groupedEntries.html)) {
78
80
  for (let i = 0; i < groupedEntries.html.length; i++) {
79
81
  const [file, originalSource] = groupedEntries.html[i];
80
82
  const rawSource = originalSource.source().toString();
81
- const wxml = templeteHandler(rawSource, {
83
+ const wxml = templateHandler(rawSource, {
82
84
  runtimeSet
83
85
  });
84
86
  const source = new ConcatSource(wxml);
package/dist/webpack.mjs CHANGED
@@ -1,14 +1,16 @@
1
1
  import path from 'node:path';
2
2
  import fs from 'node:fs';
3
- import { g as getOptions, a as createTailwindcssPatcher, b as getGroupedEntries } from './options-f7b71f03.mjs';
4
- import { a as pluginName } from './postcss-760298ba.mjs';
3
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-244dcceb.mjs';
4
+ import { a as pluginName } from './postcss-99efb521.mjs';
5
+ import { g as getGroupedEntries } from './defaults-c397b5f9.mjs';
5
6
  import 'micromatch';
6
7
  import '@babel/types';
7
8
  import '@babel/generator';
8
9
  import '@babel/parser';
9
10
  import '@babel/traverse';
10
11
  import './replace.mjs';
11
- import './shared-7c88fb94.mjs';
12
+ import './dic-3790a3a4.mjs';
13
+ import './shared-686bfc32.mjs';
12
14
  import 'postcss';
13
15
  import '@csstools/postcss-is-pseudo-class';
14
16
  import 'semver';
@@ -25,7 +27,7 @@ class UnifiedWebpackPluginV5 {
25
27
  this.appType = this.options.appType;
26
28
  }
27
29
  apply(compiler) {
28
- const { mainCssChunkMatcher, disabled, onLoad, onUpdate, onEnd, onStart, styleHandler, patch, templeteHandler, jsHandler, setMangleRuntimeSet } = this.options;
30
+ const { mainCssChunkMatcher, disabled, onLoad, onUpdate, onEnd, onStart, styleHandler, patch, templateHandler, jsHandler, setMangleRuntimeSet } = this.options;
29
31
  if (disabled) {
30
32
  return;
31
33
  }
@@ -69,7 +71,7 @@ class UnifiedWebpackPluginV5 {
69
71
  for (let i = 0; i < groupedEntries.html.length; i++) {
70
72
  const [file, originalSource] = groupedEntries.html[i];
71
73
  const rawSource = originalSource.source().toString();
72
- const wxml = templeteHandler(rawSource, {
74
+ const wxml = templateHandler(rawSource, {
73
75
  runtimeSet
74
76
  });
75
77
  const source = new ConcatSource(wxml);
@@ -1,2 +1,2 @@
1
1
  export { replaceWxml } from './shared';
2
- export { generateCode, templeteHandler, templeteReplacer, customTempleteHandler, createTempleteHandler, extractSource } from './utils';
2
+ export { generateCode, templateHandler, templateReplacer, customTemplateHandler, createTemplateHandler, extractSource } from './utils';
@@ -1,2 +1,2 @@
1
- import { ITempleteHandlerOptions } from "../types";
2
- export declare function replaceWxml(original: string, options?: ITempleteHandlerOptions): string;
1
+ import { ITemplateHandlerOptions } from "../types";
2
+ export declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
@@ -1,7 +1,7 @@
1
- import type { RawSource, ITempleteHandlerOptions } from "../types";
2
- export declare function generateCode(match: string, options?: ITempleteHandlerOptions): string;
1
+ import type { RawSource, ITemplateHandlerOptions } from "../types";
2
+ export declare function generateCode(match: string, options?: ITemplateHandlerOptions): string;
3
3
  export declare function extractSource(original: string): RawSource[];
4
- export declare function templeteReplacer(original: string, options?: ITempleteHandlerOptions): string;
5
- export declare function templeteHandler(rawSource: string, options?: ITempleteHandlerOptions): string;
6
- export declare function customTempleteHandler(rawSource: string, options: Required<ITempleteHandlerOptions>): string;
7
- export declare function createTempleteHandler(options?: Omit<ITempleteHandlerOptions, 'runtimeSet'>): (rawSource: string, opt?: Pick<ITempleteHandlerOptions, 'runtimeSet'>) => string;
4
+ export declare function templateReplacer(original: string, options?: ITemplateHandlerOptions): string;
5
+ export declare function templateHandler(rawSource: string, options?: ITemplateHandlerOptions): string;
6
+ export declare function customTemplateHandler(rawSource: string, options: Required<ITemplateHandlerOptions>): string;
7
+ export declare function createTemplateHandler(options?: Omit<ITemplateHandlerOptions, 'runtimeSet'>): (rawSource: string, opt?: Pick<ITemplateHandlerOptions, 'runtimeSet'>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "把tailwindcss jit引擎,带给小程序开发者们\nbring tailwindcss jit engine to our miniprogram developers!",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -36,6 +36,11 @@
36
36
  "require": "./dist/gulp.js",
37
37
  "import": "./dist/gulp.mjs"
38
38
  },
39
+ "./defaults": {
40
+ "types": "./dist/defaults.d.ts",
41
+ "require": "./dist/defaults.js",
42
+ "import": "./dist/defaults.mjs"
43
+ },
39
44
  "./*": "./*"
40
45
  },
41
46
  "typesVersions": {
@@ -96,11 +101,11 @@
96
101
  },
97
102
  "homepage": "https://weapp-tw.icebreaker.top",
98
103
  "devDependencies": {
99
- "@babel/core": "^7.22.8",
104
+ "@babel/core": "^7.22.9",
100
105
  "@icebreakers/cli": "^0.1.1",
101
106
  "@icebreakers/readme": "0.1.0",
102
107
  "@rollup/plugin-alias": "^5.0.0",
103
- "@rollup/plugin-commonjs": "^25.0.2",
108
+ "@rollup/plugin-commonjs": "^25.0.3",
104
109
  "@rollup/plugin-json": "^6.0.0",
105
110
  "@rollup/plugin-node-resolve": "^15.1.0",
106
111
  "@rollup/plugin-terser": "^0.4.3",
@@ -111,12 +116,12 @@
111
116
  "@types/fs-extra": "^11.0.1",
112
117
  "@types/gulp": "^4.0.13",
113
118
  "@types/gulp-postcss": "^8.0.3",
114
- "@types/jest": "^29.5.2",
119
+ "@types/jest": "^29.5.3",
115
120
  "@types/klaw": "^3.0.3",
116
121
  "@types/loader-utils": "^2.0.3",
117
122
  "@types/lodash": "^4.14.195",
118
123
  "@types/micromatch": "^4.0.2",
119
- "@types/node": "^20.4.1",
124
+ "@types/node": "^20.4.2",
120
125
  "@types/semver": "^7.5.0",
121
126
  "@types/vinyl": "^2.0.7",
122
127
  "@types/webpack": "^5.28.1",
@@ -130,7 +135,7 @@
130
135
  "css-loader": "^6.8.1",
131
136
  "defu": "6.1.2",
132
137
  "del": "^6.1.1",
133
- "eslint": "8.44.0",
138
+ "eslint": "8.45.0",
134
139
  "eslint-config-icebreaker": "^1.1.0",
135
140
  "eslint-config-prettier": "^8.8.0",
136
141
  "eslint-plugin-prettier": "^4.2.1",
@@ -152,11 +157,11 @@
152
157
  "postcss-rem-to-responsive-pixel": "^5.1.3",
153
158
  "prettier": "^2.8.8",
154
159
  "promisify-loader-runner": "^1.0.0",
155
- "rollup": "^3.26.2",
160
+ "rollup": "^3.26.3",
156
161
  "rollup-plugin-visualizer": "^5.9.2",
157
162
  "style-loader": "^3.3.3",
158
163
  "tailwind-children": "^0.5.0",
159
- "tailwindcss": "^3.3.2",
164
+ "tailwindcss": "^3.3.3",
160
165
  "ts-jest": "^29.1.1",
161
166
  "ts-node": "^10.9.1",
162
167
  "ts-patch": "^3.0.1",
@@ -165,25 +170,25 @@
165
170
  "typescript": "^5.1.6",
166
171
  "typescript-transform-paths": "^3.4.6",
167
172
  "vinyl": "^3.0.0",
168
- "vite": "^4.4.2",
173
+ "vite": "^4.4.4",
169
174
  "vitest": "^0.33.0",
170
175
  "weapp-tailwindcss-children": "^0.1.0",
171
- "webpack": "^5.88.1",
176
+ "webpack": "^5.88.2",
172
177
  "webpack-build-utils": "^0.0.4"
173
178
  },
174
179
  "dependencies": {
175
- "@babel/generator": "^7.22.7",
180
+ "@babel/generator": "^7.22.9",
176
181
  "@babel/parser": "^7.22.7",
177
182
  "@babel/traverse": "^7.22.8",
178
183
  "@babel/types": "^7.22.5",
179
184
  "@csstools/postcss-is-pseudo-class": "^4.0.0",
180
185
  "loader-utils": "^2.0.3",
181
186
  "micromatch": "^4.0.5",
182
- "postcss": "8.4.25",
187
+ "postcss": "8.4.26",
183
188
  "postcss-selector-parser": "^6.0.13",
184
189
  "semver": "^7.5.4",
185
- "tailwindcss-mangle-shared": "^1.2.6",
186
- "tailwindcss-patch": "^1.2.6"
190
+ "tailwindcss-mangle-shared": "^1.2.7",
191
+ "tailwindcss-patch": "^1.2.7"
187
192
  },
188
193
  "packageManager": "pnpm@8.6.3",
189
194
  "scripts": {