weapp-tailwindcss 2.3.4 → 2.4.0

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.
@@ -1,52 +1,5 @@
1
1
  import { ClassGenerator, defaultMangleClassFilter } from 'tailwindcss-mangle-shared';
2
2
 
3
- function isRegexp(value) {
4
- return Object.prototype.toString.call(value) === '[object RegExp]';
5
- }
6
- function isMap(value) {
7
- return Object.prototype.toString.call(value) === '[object Map]';
8
- }
9
- const noop = () => { };
10
- function groupBy(arr, cb) {
11
- if (!Array.isArray(arr)) {
12
- throw new Error('expected an array for first argument');
13
- }
14
- if (typeof cb !== 'function') {
15
- throw new Error('expected a function for second argument');
16
- }
17
- const result = {};
18
- for (let i = 0; i < arr.length; i++) {
19
- const item = arr[i];
20
- const bucketCategory = cb(item);
21
- const bucket = result[bucketCategory];
22
- if (!Array.isArray(bucket)) {
23
- result[bucketCategory] = [item];
24
- }
25
- else {
26
- result[bucketCategory].push(item);
27
- }
28
- }
29
- return result;
30
- }
31
- function getGroupedEntries(entries, options) {
32
- const { cssMatcher, htmlMatcher, jsMatcher } = options;
33
- const groupedEntries = groupBy(entries, ([file]) => {
34
- if (cssMatcher(file)) {
35
- return 'css';
36
- }
37
- else if (htmlMatcher(file)) {
38
- return 'html';
39
- }
40
- else if (jsMatcher(file)) {
41
- return 'js';
42
- }
43
- else {
44
- return 'other';
45
- }
46
- });
47
- return groupedEntries;
48
- }
49
-
50
3
  const SYMBOL_TABLE = {
51
4
  BACKQUOTE: '`',
52
5
  TILDE: '~',
@@ -151,15 +104,16 @@ const SimpleMappingChars2String = {
151
104
  };
152
105
  const SimpleMappingChars2StringEntries = Object.entries(SimpleMappingChars2String);
153
106
 
107
+ const MAX_ASCII_CHAR_CODE = 127;
154
108
  function escape(selectors, options = {
155
109
  map: SimpleMappingChars2String
156
110
  }) {
157
111
  const { map = SimpleMappingChars2String } = options;
158
- const sb = selectors.split('');
112
+ const sb = [...selectors];
159
113
  for (let i = 0; i < sb.length; i++) {
160
114
  const char = sb[i];
161
- const code = char.charCodeAt(0);
162
- if (code > 127) {
115
+ const code = char.codePointAt(0);
116
+ if (code !== undefined && code > MAX_ASCII_CHAR_CODE) {
163
117
  sb[i] = 'u' + Number(code).toString(16);
164
118
  }
165
119
  else {
@@ -173,22 +127,68 @@ function escape(selectors, options = {
173
127
  return res;
174
128
  }
175
129
 
176
- const validateFilterRE = /[\w\u00A0-\uFFFF-_:%-?]/;
130
+ const validateFilterRE = /[\w%-?\u00A0-\uFFFF-]/;
177
131
  function isValidSelector(selector = '') {
178
132
  return validateFilterRE.test(selector);
179
133
  }
180
134
  const splitCode = (code) => {
181
- return code.split(/[\s]+/).filter(isValidSelector);
135
+ return code.split(/\s+/).filter((element) => isValidSelector(element));
182
136
  };
183
137
 
138
+ function isRegexp(value) {
139
+ return Object.prototype.toString.call(value) === '[object RegExp]';
140
+ }
141
+ function isMap(value) {
142
+ return Object.prototype.toString.call(value) === '[object Map]';
143
+ }
144
+ const noop = () => { };
145
+ function groupBy(arr, cb) {
146
+ if (!Array.isArray(arr)) {
147
+ throw new TypeError('expected an array for first argument');
148
+ }
149
+ if (typeof cb !== 'function') {
150
+ throw new TypeError('expected a function for second argument');
151
+ }
152
+ const result = {};
153
+ for (const item of arr) {
154
+ const bucketCategory = cb(item);
155
+ const bucket = result[bucketCategory];
156
+ if (Array.isArray(bucket)) {
157
+ result[bucketCategory].push(item);
158
+ }
159
+ else {
160
+ result[bucketCategory] = [item];
161
+ }
162
+ }
163
+ return result;
164
+ }
165
+ function getGroupedEntries(entries, options) {
166
+ const { cssMatcher, htmlMatcher, jsMatcher } = options;
167
+ const groupedEntries = groupBy(entries, ([file]) => {
168
+ if (cssMatcher(file)) {
169
+ return 'css';
170
+ }
171
+ else if (htmlMatcher(file)) {
172
+ return 'html';
173
+ }
174
+ else if (jsMatcher(file)) {
175
+ return 'js';
176
+ }
177
+ else {
178
+ return 'other';
179
+ }
180
+ });
181
+ return groupedEntries;
182
+ }
183
+
184
184
  function escapeStringRegexp(str) {
185
185
  if (typeof str !== 'string') {
186
186
  throw new TypeError('Expected a string');
187
187
  }
188
- return str.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
188
+ return str.replaceAll(/[$()*+.?[\\\]^{|}]/g, '\\$&').replaceAll('-', '\\x2d');
189
189
  }
190
- const templateClassExactRegexp = /(?:(?<=^|\s)(?:hover-)?class)=(?:["']\W+\s*(?:\w+)\()?["']([^"]+)['"]/gs;
191
- const tagWithEitherClassAndHoverClassRegexp = /<(?:[a-z][-a-z]*[a-z]*)\s+[^>]*?(?:(?:hover-)?class="(?:[^"]*)")[^>]*?\/?>/g;
190
+ const templateClassExactRegexp = /(?<=^|\s)(?:hover-)?class=(?:["']\W+\s*\w+\()?["']([^"]+)["']/gs;
191
+ const tagWithEitherClassAndHoverClassRegexp = /<[a-z][a-z-]*[a-z]*\s+[^>]*?(?:hover-)?clas{2}="[^"]*"[^>]*?\/?>/g;
192
192
  function handleRegexp(reg) {
193
193
  return `(?:${reg.source})`;
194
194
  }
@@ -281,10 +281,9 @@ function useStore() {
281
281
  }
282
282
  function handleValue(rawSource) {
283
283
  const arr = splitCode(rawSource);
284
- for (let i = 0; i < arr.length; i++) {
285
- const x = arr[i];
284
+ for (const x of arr) {
286
285
  if (store.runtimeSet.has(x)) {
287
- rawSource = rawSource.replace(new RegExp(escapeStringRegexp(x), 'g'), store.classGenerator.generateClassName(x).name);
286
+ rawSource = rawSource.replaceAll(new RegExp(escapeStringRegexp(x), 'g'), store.classGenerator.generateClassName(x).name);
288
287
  }
289
288
  }
290
289
  return rawSource;
@@ -314,11 +313,11 @@ function initStore(options) {
314
313
  }
315
314
  function setRuntimeSet(runtimeSet) {
316
315
  const newSet = new Set();
317
- runtimeSet.forEach((c) => {
316
+ for (const c of runtimeSet) {
318
317
  if (store.filter(c)) {
319
318
  newSet.add(c);
320
319
  }
321
- });
320
+ }
322
321
  store.runtimeSet = newSet;
323
322
  }
324
323
 
@@ -2,53 +2,6 @@
2
2
 
3
3
  var tailwindcssMangleShared = require('tailwindcss-mangle-shared');
4
4
 
5
- function isRegexp(value) {
6
- return Object.prototype.toString.call(value) === '[object RegExp]';
7
- }
8
- function isMap(value) {
9
- return Object.prototype.toString.call(value) === '[object Map]';
10
- }
11
- const noop = () => { };
12
- function groupBy(arr, cb) {
13
- if (!Array.isArray(arr)) {
14
- throw new Error('expected an array for first argument');
15
- }
16
- if (typeof cb !== 'function') {
17
- throw new Error('expected a function for second argument');
18
- }
19
- const result = {};
20
- for (let i = 0; i < arr.length; i++) {
21
- const item = arr[i];
22
- const bucketCategory = cb(item);
23
- const bucket = result[bucketCategory];
24
- if (!Array.isArray(bucket)) {
25
- result[bucketCategory] = [item];
26
- }
27
- else {
28
- result[bucketCategory].push(item);
29
- }
30
- }
31
- return result;
32
- }
33
- function getGroupedEntries(entries, options) {
34
- const { cssMatcher, htmlMatcher, jsMatcher } = options;
35
- const groupedEntries = groupBy(entries, ([file]) => {
36
- if (cssMatcher(file)) {
37
- return 'css';
38
- }
39
- else if (htmlMatcher(file)) {
40
- return 'html';
41
- }
42
- else if (jsMatcher(file)) {
43
- return 'js';
44
- }
45
- else {
46
- return 'other';
47
- }
48
- });
49
- return groupedEntries;
50
- }
51
-
52
5
  const SYMBOL_TABLE = {
53
6
  BACKQUOTE: '`',
54
7
  TILDE: '~',
@@ -153,15 +106,16 @@ const SimpleMappingChars2String = {
153
106
  };
154
107
  const SimpleMappingChars2StringEntries = Object.entries(SimpleMappingChars2String);
155
108
 
109
+ const MAX_ASCII_CHAR_CODE = 127;
156
110
  function escape(selectors, options = {
157
111
  map: SimpleMappingChars2String
158
112
  }) {
159
113
  const { map = SimpleMappingChars2String } = options;
160
- const sb = selectors.split('');
114
+ const sb = [...selectors];
161
115
  for (let i = 0; i < sb.length; i++) {
162
116
  const char = sb[i];
163
- const code = char.charCodeAt(0);
164
- if (code > 127) {
117
+ const code = char.codePointAt(0);
118
+ if (code !== undefined && code > MAX_ASCII_CHAR_CODE) {
165
119
  sb[i] = 'u' + Number(code).toString(16);
166
120
  }
167
121
  else {
@@ -175,22 +129,68 @@ function escape(selectors, options = {
175
129
  return res;
176
130
  }
177
131
 
178
- const validateFilterRE = /[\w\u00A0-\uFFFF-_:%-?]/;
132
+ const validateFilterRE = /[\w%-?\u00A0-\uFFFF-]/;
179
133
  function isValidSelector(selector = '') {
180
134
  return validateFilterRE.test(selector);
181
135
  }
182
136
  const splitCode = (code) => {
183
- return code.split(/[\s]+/).filter(isValidSelector);
137
+ return code.split(/\s+/).filter((element) => isValidSelector(element));
184
138
  };
185
139
 
140
+ function isRegexp(value) {
141
+ return Object.prototype.toString.call(value) === '[object RegExp]';
142
+ }
143
+ function isMap(value) {
144
+ return Object.prototype.toString.call(value) === '[object Map]';
145
+ }
146
+ const noop = () => { };
147
+ function groupBy(arr, cb) {
148
+ if (!Array.isArray(arr)) {
149
+ throw new TypeError('expected an array for first argument');
150
+ }
151
+ if (typeof cb !== 'function') {
152
+ throw new TypeError('expected a function for second argument');
153
+ }
154
+ const result = {};
155
+ for (const item of arr) {
156
+ const bucketCategory = cb(item);
157
+ const bucket = result[bucketCategory];
158
+ if (Array.isArray(bucket)) {
159
+ result[bucketCategory].push(item);
160
+ }
161
+ else {
162
+ result[bucketCategory] = [item];
163
+ }
164
+ }
165
+ return result;
166
+ }
167
+ function getGroupedEntries(entries, options) {
168
+ const { cssMatcher, htmlMatcher, jsMatcher } = options;
169
+ const groupedEntries = groupBy(entries, ([file]) => {
170
+ if (cssMatcher(file)) {
171
+ return 'css';
172
+ }
173
+ else if (htmlMatcher(file)) {
174
+ return 'html';
175
+ }
176
+ else if (jsMatcher(file)) {
177
+ return 'js';
178
+ }
179
+ else {
180
+ return 'other';
181
+ }
182
+ });
183
+ return groupedEntries;
184
+ }
185
+
186
186
  function escapeStringRegexp(str) {
187
187
  if (typeof str !== 'string') {
188
188
  throw new TypeError('Expected a string');
189
189
  }
190
- return str.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
190
+ return str.replaceAll(/[$()*+.?[\\\]^{|}]/g, '\\$&').replaceAll('-', '\\x2d');
191
191
  }
192
- const templateClassExactRegexp = /(?:(?<=^|\s)(?:hover-)?class)=(?:["']\W+\s*(?:\w+)\()?["']([^"]+)['"]/gs;
193
- const tagWithEitherClassAndHoverClassRegexp = /<(?:[a-z][-a-z]*[a-z]*)\s+[^>]*?(?:(?:hover-)?class="(?:[^"]*)")[^>]*?\/?>/g;
192
+ const templateClassExactRegexp = /(?<=^|\s)(?:hover-)?class=(?:["']\W+\s*\w+\()?["']([^"]+)["']/gs;
193
+ const tagWithEitherClassAndHoverClassRegexp = /<[a-z][a-z-]*[a-z]*\s+[^>]*?(?:hover-)?clas{2}="[^"]*"[^>]*?\/?>/g;
194
194
  function handleRegexp(reg) {
195
195
  return `(?:${reg.source})`;
196
196
  }
@@ -283,10 +283,9 @@ function useStore() {
283
283
  }
284
284
  function handleValue(rawSource) {
285
285
  const arr = splitCode(rawSource);
286
- for (let i = 0; i < arr.length; i++) {
287
- const x = arr[i];
286
+ for (const x of arr) {
288
287
  if (store.runtimeSet.has(x)) {
289
- rawSource = rawSource.replace(new RegExp(escapeStringRegexp(x), 'g'), store.classGenerator.generateClassName(x).name);
288
+ rawSource = rawSource.replaceAll(new RegExp(escapeStringRegexp(x), 'g'), store.classGenerator.generateClassName(x).name);
290
289
  }
291
290
  }
292
291
  return rawSource;
@@ -316,11 +315,11 @@ function initStore(options) {
316
315
  }
317
316
  function setRuntimeSet(runtimeSet) {
318
317
  const newSet = new Set();
319
- runtimeSet.forEach((c) => {
318
+ for (const c of runtimeSet) {
320
319
  if (store.filter(c)) {
321
320
  newSet.add(c);
322
321
  }
323
- });
322
+ }
324
323
  store.runtimeSet = newSet;
325
324
  }
326
325
 
@@ -1,5 +1,5 @@
1
- import type { ILengthUnitsPatchOptions, InternalPatchResult } from "../types";
2
1
  import { TailwindcssPatcher } from 'tailwindcss-patch';
2
+ import type { ILengthUnitsPatchOptions, InternalPatchResult } from "../types";
3
3
  export declare function getInstalledPkgJsonPath(options: ILengthUnitsPatchOptions): string | undefined;
4
4
  export declare function createPatch(options: false | ILengthUnitsPatchOptions): () => void;
5
5
  export declare function monkeyPatchForSupportingCustomUnit(rootDir: string, options: ILengthUnitsPatchOptions): string | undefined;
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { InjectPreflight } from './postcss/preflight';
2
1
  import type { Rule } from 'postcss';
3
2
  import type { IClassGeneratorOptions } from 'tailwindcss-mangle-shared';
4
3
  import type { GeneratorResult } from '@babel/generator';
4
+ import type { InjectPreflight } from './postcss/preflight';
5
5
  export type ItemOrItemArray<T> = T | T[];
6
6
  export type { TraverseOptions } from '@babel/traverse';
7
7
  export type { Node } from '@babel/types';
package/dist/utils.d.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import type { InternalUserDefinedOptions } from "./types";
2
- import defu from 'defu';
3
2
  export declare function isRegexp(value: unknown): boolean;
4
3
  export declare function isMap(value: unknown): boolean;
5
4
  export declare function regExpTest(arr: (string | RegExp)[] | undefined, str: string): boolean;
6
5
  export declare const noop: () => void;
7
- export declare function isAscii(str: string): boolean;
8
- export { defu };
9
6
  export declare function getGroupedEntries<T>(entries: [string, T][], options: InternalUserDefinedOptions): Record<"css" | "html" | "js" | "other", [string, T][]>;
7
+ export { default as defu } from 'defu';
package/dist/vite.js CHANGED
@@ -2,26 +2,26 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-7f22c17e.js');
6
- var postcss = require('./postcss-dc9eeafc.js');
7
- var shared = require('./shared-c2953d9d.js');
5
+ var options = require('./options-450d76c2.js');
6
+ var postcss = require('./postcss-0c103b15.js');
7
+ var shared = require('./shared-9744fdd1.js');
8
8
  require('micromatch');
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
14
  require('tailwindcss-mangle-shared');
14
- require('@babel/types');
15
15
  require('postcss');
16
16
  require('@csstools/postcss-is-pseudo-class');
17
- require('path');
18
- require('fs');
17
+ require('node:path');
18
+ require('node:fs');
19
19
  require('semver');
20
20
  require('tailwindcss-patch');
21
21
  require('postcss-selector-parser');
22
22
 
23
23
  function UnifiedViteWeappTailwindcssPlugin(options$1 = {}) {
24
- if (typeof options$1.customReplaceDictionary === 'undefined') {
24
+ if (options$1.customReplaceDictionary === undefined) {
25
25
  options$1.customReplaceDictionary = 'simple';
26
26
  }
27
27
  const opts = options.getOptions(options$1, ['patch', 'style', 'templete', 'js']);
package/dist/vite.mjs CHANGED
@@ -1,23 +1,23 @@
1
- import { g as getOptions, a as createTailwindcssPatcher } from './options-d1b3c0bf.mjs';
2
- import { v as vitePluginName } from './postcss-1f9a5153.mjs';
3
- import { c as initStore, g as getGroupedEntries, d as setRuntimeSet } from './shared-eae1dc7a.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-5c083791.mjs';
2
+ import { v as vitePluginName } from './postcss-e3fcf6f1.mjs';
3
+ import { c as initStore, g as getGroupedEntries, d as setRuntimeSet } from './shared-89ea7f77.mjs';
4
4
  import 'micromatch';
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
10
  import 'tailwindcss-mangle-shared';
10
- import '@babel/types';
11
11
  import 'postcss';
12
12
  import '@csstools/postcss-is-pseudo-class';
13
- import 'path';
14
- import 'fs';
13
+ import 'node:path';
14
+ import 'node:fs';
15
15
  import 'semver';
16
16
  import 'tailwindcss-patch';
17
17
  import 'postcss-selector-parser';
18
18
 
19
19
  function UnifiedViteWeappTailwindcssPlugin(options = {}) {
20
- if (typeof options.customReplaceDictionary === 'undefined') {
20
+ if (options.customReplaceDictionary === undefined) {
21
21
  options.customReplaceDictionary = 'simple';
22
22
  }
23
23
  const opts = getOptions(options, ['patch', 'style', 'templete', 'js']);
@@ -1,5 +1,5 @@
1
- import type { AppType, UserDefinedOptions, InternalUserDefinedOptions, IBaseWebpackPlugin } from "../../types";
2
1
  import type { Compiler } from 'webpack';
2
+ import type { AppType, UserDefinedOptions, InternalUserDefinedOptions, IBaseWebpackPlugin } from "../../types";
3
3
  export declare class UnifiedWebpackPluginV5 implements IBaseWebpackPlugin {
4
4
  options: InternalUserDefinedOptions;
5
5
  appType?: AppType;
package/dist/webpack.js CHANGED
@@ -2,19 +2,19 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var options = require('./options-7f22c17e.js');
6
- var postcss = require('./postcss-dc9eeafc.js');
7
- var shared = require('./shared-c2953d9d.js');
5
+ var options = require('./options-450d76c2.js');
6
+ var postcss = require('./postcss-0c103b15.js');
7
+ var shared = require('./shared-9744fdd1.js');
8
8
  require('micromatch');
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('@babel/types');
14
14
  require('postcss');
15
15
  require('@csstools/postcss-is-pseudo-class');
16
- require('path');
17
- require('fs');
16
+ require('node:path');
17
+ require('node:fs');
18
18
  require('semver');
19
19
  require('tailwindcss-patch');
20
20
  require('postcss-selector-parser');
@@ -22,7 +22,7 @@ require('tailwindcss-mangle-shared');
22
22
 
23
23
  class UnifiedWebpackPluginV5 {
24
24
  constructor(options$1 = {}) {
25
- if (typeof options$1.customReplaceDictionary === 'undefined') {
25
+ if (options$1.customReplaceDictionary === undefined) {
26
26
  options$1.customReplaceDictionary = 'simple';
27
27
  }
28
28
  this.options = options.getOptions(options$1, ['style', 'patch', 'templete', 'js']);
@@ -40,9 +40,9 @@ class UnifiedWebpackPluginV5 {
40
40
  const twPatcher = options.createTailwindcssPatcher();
41
41
  function getClassSet() {
42
42
  let set = twPatcher.getClassSet();
43
- if (!set.size) {
43
+ if (set.size === 0) {
44
44
  const cacheSet = twPatcher.getCache();
45
- if (cacheSet && cacheSet.size) {
45
+ if (cacheSet && cacheSet.size > 0) {
46
46
  set = cacheSet;
47
47
  }
48
48
  }
package/dist/webpack.mjs CHANGED
@@ -1,16 +1,16 @@
1
- import { g as getOptions, a as createTailwindcssPatcher } from './options-d1b3c0bf.mjs';
2
- import { a as pluginName, N as NS } from './postcss-1f9a5153.mjs';
3
- import { c as initStore, g as getGroupedEntries, d as setRuntimeSet } from './shared-eae1dc7a.mjs';
1
+ import { g as getOptions, a as createTailwindcssPatcher } from './options-5c083791.mjs';
2
+ import { a as pluginName, N as NS } from './postcss-e3fcf6f1.mjs';
3
+ import { c as initStore, g as getGroupedEntries, d as setRuntimeSet } from './shared-89ea7f77.mjs';
4
4
  import 'micromatch';
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 '@babel/types';
10
10
  import 'postcss';
11
11
  import '@csstools/postcss-is-pseudo-class';
12
- import 'path';
13
- import 'fs';
12
+ import 'node:path';
13
+ import 'node:fs';
14
14
  import 'semver';
15
15
  import 'tailwindcss-patch';
16
16
  import 'postcss-selector-parser';
@@ -18,7 +18,7 @@ import 'tailwindcss-mangle-shared';
18
18
 
19
19
  class UnifiedWebpackPluginV5 {
20
20
  constructor(options = {}) {
21
- if (typeof options.customReplaceDictionary === 'undefined') {
21
+ if (options.customReplaceDictionary === undefined) {
22
22
  options.customReplaceDictionary = 'simple';
23
23
  }
24
24
  this.options = getOptions(options, ['style', 'patch', 'templete', 'js']);
@@ -36,9 +36,9 @@ class UnifiedWebpackPluginV5 {
36
36
  const twPatcher = createTailwindcssPatcher();
37
37
  function getClassSet() {
38
38
  let set = twPatcher.getClassSet();
39
- if (!set.size) {
39
+ if (set.size === 0) {
40
40
  const cacheSet = twPatcher.getCache();
41
- if (cacheSet && cacheSet.size) {
41
+ if (cacheSet && cacheSet.size > 0) {
42
42
  set = cacheSet;
43
43
  }
44
44
  }
@@ -1,3 +1,2 @@
1
- import { replaceWxml } from './shared';
2
- import { generateCode, templeteHandler, templeteReplacer } from './utils';
3
- export { replaceWxml, generateCode, templeteHandler, templeteReplacer };
1
+ export { replaceWxml } from './shared';
2
+ export { generateCode, templeteHandler, templeteReplacer } from './utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "2.3.4",
3
+ "version": "2.4.0",
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",
@@ -45,6 +45,7 @@
45
45
  ]
46
46
  }
47
47
  },
48
+ "sideEffects": false,
48
49
  "repository": {
49
50
  "type": "git",
50
51
  "url": "git+https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin.git"
@@ -96,9 +97,7 @@
96
97
  "homepage": "https://weapp-tw.icebreaker.top",
97
98
  "devDependencies": {
98
99
  "@babel/core": "^7.21.4",
99
- "@babel/preset-react": "^7.18.6",
100
100
  "@icebreakers/cli": "^0.1.1",
101
- "@icebreakers/eslint-config-ts": "^1.0.4",
102
101
  "@icebreakers/readme": "0.1.0",
103
102
  "@rollup/plugin-alias": "^5.0.0",
104
103
  "@rollup/plugin-commonjs": "^25.0.0",
@@ -109,15 +108,13 @@
109
108
  "@tsconfig/recommended": "^1.0.2",
110
109
  "@types/babel__generator": "^7.6.4",
111
110
  "@types/babel__traverse": "^7.18.5",
112
- "@types/cssesc": "^3.0.0",
113
- "@types/file-saver": "^2.0.5",
114
111
  "@types/fs-extra": "^11.0.1",
115
112
  "@types/gulp": "^4.0.10",
116
113
  "@types/gulp-postcss": "^8.0.3",
117
114
  "@types/jest": "^29.5.1",
118
115
  "@types/lodash": "^4.14.194",
119
116
  "@types/micromatch": "^4.0.2",
120
- "@types/node": "^20.2.0",
117
+ "@types/node": "^20.2.3",
121
118
  "@types/react": "^18.2.6",
122
119
  "@types/semver": "^7.5.0",
123
120
  "@types/vinyl": "^2.0.7",
@@ -129,11 +126,11 @@
129
126
  "bumpp": "^9.1.0",
130
127
  "chalk": "4.1.2",
131
128
  "cross-env": "^7.0.3",
132
- "css-loader": "^6.7.3",
133
- "cssesc": "^3.0.0",
129
+ "css-loader": "^6.7.4",
134
130
  "defu": "6.1.2",
135
131
  "del": "^6.1.1",
136
- "eslint": "8.40.0",
132
+ "eslint": "8.41.0",
133
+ "eslint-config-icebreaker": "^1.1.0",
137
134
  "execa": "5",
138
135
  "fast-glob": "^3.2.12",
139
136
  "fs-extra": "^11.1.1",
@@ -143,24 +140,24 @@
143
140
  "jest": "^29.5.0",
144
141
  "lodash": "^4.17.21",
145
142
  "memfs": "^3.5.1",
146
- "mini-css-extract-plugin": "^2.7.5",
143
+ "mini-css-extract-plugin": "^2.7.6",
147
144
  "miniprogram-automator": "^0.12.0",
148
145
  "pkg-types": "^1.0.3",
149
146
  "postcss-load-config": "^4.0.1",
150
147
  "postcss-loader": "^7.3.0",
151
148
  "postcss-rem-to-responsive-pixel": "^5.1.3",
152
149
  "prettier": "^2.8.8",
153
- "rollup": "^3.22.0",
150
+ "rollup": "^3.23.0",
154
151
  "rollup-plugin-visualizer": "^5.9.0",
155
152
  "simple-functional-loader": "^1.2.1",
156
- "style-loader": "^3.3.2",
153
+ "style-loader": "^3.3.3",
157
154
  "tailwind-children": "^0.5.0",
158
155
  "tailwindcss": "^3.3.2",
159
156
  "ts-jest": "^29.1.0",
160
157
  "ts-node": "^10.9.1",
161
158
  "ts-patch": "^2.1.0",
162
159
  "tsd": "^0.28.1",
163
- "tslib": "^2.5.1",
160
+ "tslib": "^2.5.2",
164
161
  "ttypescript": "^1.5.15",
165
162
  "typescript": "^4.9.5",
166
163
  "typescript-transform-paths": "^3.4.6",
@@ -175,8 +172,7 @@
175
172
  "@babel/parser": "^7.21.4",
176
173
  "@babel/traverse": "^7.21.4",
177
174
  "@babel/types": "^7.21.4",
178
- "@csstools/postcss-is-pseudo-class": "^3.2.0",
179
- "file-saver": "^2.0.5",
175
+ "@csstools/postcss-is-pseudo-class": "^3.2.1",
180
176
  "micromatch": "^4.0.5",
181
177
  "postcss": "8.4.23",
182
178
  "postcss-selector-parser": "^6.0.13",