weapp-tailwindcss 2.11.0 → 3.0.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/dist/{gulp → bundlers/gulp}/index.d.ts +1 -1
- package/dist/{vite → bundlers/vite}/index.d.ts +1 -1
- package/dist/{webpack → bundlers/webpack}/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/cli.js +7 -7
- package/dist/cli.mjs +7 -7
- package/dist/core.js +7 -7
- package/dist/core.mjs +7 -7
- package/dist/css-macro/index.js +1 -1
- package/dist/css-macro/index.mjs +1 -1
- package/dist/{defaults-0O-zKoXE.js → defaults-QOAV8NSV.js} +10 -5
- package/dist/{defaults-dz6xGhOP.mjs → defaults-TZpmwtzd.mjs} +10 -6
- package/dist/defaults.js +2 -1
- package/dist/defaults.mjs +2 -1
- package/dist/{defu-VMJMz2AB.js → defu-KWuJnZLV.js} +1 -0
- package/dist/{defu-NLkZUlr9.mjs → defu-ms_ZBCiB.mjs} +1 -1
- package/dist/gulp.d.ts +1 -1
- package/dist/gulp.js +7 -7
- package/dist/gulp.mjs +7 -7
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/dist/js/handlers.d.ts +0 -1
- package/dist/{options-lXV72tWf.js → options-M6TutRrF.js} +70 -186
- package/dist/{options-M8pGfjj_.mjs → options-mJwenBmV.mjs} +71 -186
- package/dist/postcss/mp.d.ts +1 -1
- package/dist/postcss/plugins/ctx.d.ts +4 -0
- package/dist/postcss/plugins/index.d.ts +7 -0
- package/dist/postcss/plugins/post.d.ts +5 -0
- package/dist/postcss/plugins/pre.d.ts +5 -0
- package/dist/postcss/shared.d.ts +1 -0
- package/dist/postcss/symbols.d.ts +1 -0
- package/dist/{postcss-Et8j4ugT.js → postcss-XAQSRPqF.js} +152 -62
- package/dist/{postcss-W8i3cl5I.mjs → postcss-kpIT_QQe.mjs} +148 -62
- package/dist/postcss.d.ts +1 -1
- package/dist/postcss.js +11 -3
- package/dist/postcss.mjs +3 -2
- package/dist/replace.js +1 -1
- package/dist/replace.mjs +1 -1
- package/dist/{shared-S0v7ZvWs.mjs → shared-0D5OOeXo.mjs} +10 -1
- package/dist/{shared-nXoJWFdz.js → shared-AxeHlAoJ.js} +10 -0
- package/dist/types.d.ts +17 -21
- package/dist/utils.d.ts +9 -0
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +7 -7
- package/dist/vite.mjs +7 -7
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +7 -7
- package/dist/webpack.mjs +7 -7
- package/package.json +26 -34
- package/dist/postcss/plugin.d.ts +0 -6
- /package/dist/{webpack → bundlers/webpack}/index.d.ts +0 -0
- /package/dist/{webpack → bundlers/webpack}/loaders/weapp-tw-runtime-loader.d.ts +0 -0
package/dist/replace.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { escape, SimpleMappingChars2String } from '@weapp-core/escape';
|
|
2
2
|
export { MappingChars2String, MappingChars2StringEntries, SYMBOL_TABLE, SimpleMappingChars2String, SimpleMappingChars2StringEntries } from '@weapp-core/escape';
|
|
3
3
|
import '@ast-core/escape';
|
|
4
|
-
export { i as replaceCss } from './shared-
|
|
4
|
+
export { i as replaceCss } from './shared-0D5OOeXo.mjs';
|
|
5
5
|
|
|
6
6
|
function replaceWxml(original, options = {
|
|
7
7
|
keepEOL: false,
|
|
@@ -12,5 +12,14 @@ function internalCssSelectorReplacer(selectors, options = {
|
|
|
12
12
|
map: escapeMap
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
+
function composeIsPseudo(strs) {
|
|
16
|
+
if (typeof strs === 'string') {
|
|
17
|
+
return strs;
|
|
18
|
+
}
|
|
19
|
+
if (strs.length > 1) {
|
|
20
|
+
return `:is(${strs.join(',')})`;
|
|
21
|
+
}
|
|
22
|
+
return strs.join('');
|
|
23
|
+
}
|
|
15
24
|
|
|
16
|
-
export { internalCssSelectorReplacer as i };
|
|
25
|
+
export { composeIsPseudo as c, internalCssSelectorReplacer as i };
|
|
@@ -14,5 +14,15 @@ function internalCssSelectorReplacer(selectors, options = {
|
|
|
14
14
|
map: escapeMap
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
+
function composeIsPseudo(strs) {
|
|
18
|
+
if (typeof strs === 'string') {
|
|
19
|
+
return strs;
|
|
20
|
+
}
|
|
21
|
+
if (strs.length > 1) {
|
|
22
|
+
return `:is(${strs.join(',')})`;
|
|
23
|
+
}
|
|
24
|
+
return strs.join('');
|
|
25
|
+
}
|
|
17
26
|
|
|
27
|
+
exports.composeIsPseudo = composeIsPseudo;
|
|
18
28
|
exports.internalCssSelectorReplacer = internalCssSelectorReplacer;
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import type { Rule } from 'postcss';
|
|
|
2
2
|
import type { IClassGeneratorOptions, ClassGenerator } from '@tailwindcss-mangle/shared';
|
|
3
3
|
import type { SourceMap } from 'magic-string';
|
|
4
4
|
import type { GeneratorResult } from '@babel/generator';
|
|
5
|
+
import type { UserDefinedOptions as rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
|
|
5
6
|
import type { InjectPreflight } from './postcss/preflight';
|
|
7
|
+
import type { IContext as PostcssContext } from './postcss/plugins/ctx';
|
|
6
8
|
import type { ICreateCacheReturnType } from "./cache";
|
|
7
9
|
export type ItemOrItemArray<T> = T | T[];
|
|
8
10
|
export type AppType = 'uni-app' | 'uni-app-vite' | 'taro' | 'remax' | 'rax' | 'native' | 'kbone' | 'mpx';
|
|
@@ -18,7 +20,7 @@ export type RequiredStyleHandlerOptions = {
|
|
|
18
20
|
isMainChunk: boolean;
|
|
19
21
|
cssInjectPreflight?: InjectPreflight;
|
|
20
22
|
escapeMap?: Record<string, string>;
|
|
21
|
-
} & Pick<UserDefinedOptions, 'cssPreflightRange' | 'cssChildCombinatorReplaceValue' | '
|
|
23
|
+
} & Pick<UserDefinedOptions, 'cssPreflightRange' | 'cssChildCombinatorReplaceValue' | 'injectAdditionalCssVarScope' | 'cssSelectorReplacement' | 'rem2rpx'>;
|
|
22
24
|
export type CustomRuleCallback = (node: Rule, options: Readonly<RequiredStyleHandlerOptions>) => void;
|
|
23
25
|
export interface InternalCssSelectorReplacerOptions {
|
|
24
26
|
mangleContext?: IMangleScopeContext;
|
|
@@ -27,6 +29,7 @@ export interface InternalCssSelectorReplacerOptions {
|
|
|
27
29
|
export type IStyleHandlerOptions = {
|
|
28
30
|
customRuleCallback?: CustomRuleCallback;
|
|
29
31
|
mangleContext?: IMangleScopeContext;
|
|
32
|
+
ctx?: PostcssContext;
|
|
30
33
|
} & RequiredStyleHandlerOptions;
|
|
31
34
|
export type JsHandlerReplaceResult = {
|
|
32
35
|
code: string;
|
|
@@ -38,11 +41,9 @@ export type ICustomAttributesEntities = [string | RegExp, ItemOrItemArray<string
|
|
|
38
41
|
export type IJsHandlerOptions = {
|
|
39
42
|
escapeMap?: Record<string, string>;
|
|
40
43
|
classNameSet: Set<string>;
|
|
41
|
-
minifiedJs?: boolean;
|
|
42
44
|
arbitraryValues?: IArbitraryValues;
|
|
43
45
|
mangleContext?: IMangleScopeContext;
|
|
44
46
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
45
|
-
strategy?: UserDefinedOptions['jsEscapeStrategy'];
|
|
46
47
|
needEscaped?: boolean;
|
|
47
48
|
generateMap?: boolean;
|
|
48
49
|
};
|
|
@@ -74,13 +75,12 @@ export interface IArbitraryValues {
|
|
|
74
75
|
allowDoubleQuotes?: boolean;
|
|
75
76
|
}
|
|
76
77
|
export interface UserDefinedOptions {
|
|
77
|
-
htmlMatcher?: (
|
|
78
|
-
cssMatcher?: (
|
|
79
|
-
jsMatcher?: (
|
|
80
|
-
mainCssChunkMatcher?: (
|
|
78
|
+
htmlMatcher?: (name: string) => boolean;
|
|
79
|
+
cssMatcher?: (name: string) => boolean;
|
|
80
|
+
jsMatcher?: (name: string) => boolean;
|
|
81
|
+
mainCssChunkMatcher?: (name: string, appType?: AppType) => boolean;
|
|
81
82
|
cssPreflight?: CssPreflightOptions;
|
|
82
|
-
cssPreflightRange?: '
|
|
83
|
-
replaceUniversalSelectorWith?: string | false;
|
|
83
|
+
cssPreflightRange?: 'all';
|
|
84
84
|
disabled?: boolean;
|
|
85
85
|
customRuleCallback?: CustomRuleCallback;
|
|
86
86
|
onLoad?: () => void;
|
|
@@ -88,25 +88,24 @@ export interface UserDefinedOptions {
|
|
|
88
88
|
onUpdate?: (filename: string, oldVal: string, newVal: string) => void;
|
|
89
89
|
onEnd?: () => void;
|
|
90
90
|
customAttributes?: ICustomAttributes;
|
|
91
|
-
customReplaceDictionary?: 'simple' |
|
|
92
|
-
supportCustomLengthUnitsPatch?: ILengthUnitsPatchOptions
|
|
91
|
+
customReplaceDictionary?: 'simple' | Record<string, string>;
|
|
92
|
+
supportCustomLengthUnitsPatch?: ILengthUnitsPatchOptions;
|
|
93
93
|
appType?: AppType;
|
|
94
|
-
minifiedJs?: boolean;
|
|
95
94
|
mangle?: boolean | IMangleOptions;
|
|
96
95
|
arbitraryValues?: IArbitraryValues;
|
|
97
96
|
cssChildCombinatorReplaceValue?: string | string[];
|
|
98
|
-
wxsMatcher?: (
|
|
97
|
+
wxsMatcher?: (name: string) => boolean;
|
|
99
98
|
inlineWxs?: boolean;
|
|
100
99
|
injectAdditionalCssVarScope?: boolean;
|
|
101
100
|
jsPreserveClass?: (keyword: string) => boolean | undefined;
|
|
102
101
|
disabledDefaultTemplateHandler?: boolean;
|
|
103
|
-
jsEscapeStrategy?: 'regenerate' | 'replace';
|
|
104
102
|
runtimeLoaderPath?: string;
|
|
105
103
|
cssSelectorReplacement?: {
|
|
106
|
-
root?: string | false;
|
|
107
|
-
universal?: string | false;
|
|
104
|
+
root?: string | string[] | false;
|
|
105
|
+
universal?: string | string[] | false;
|
|
108
106
|
};
|
|
109
107
|
tailwindcssBasedir?: string;
|
|
108
|
+
rem2rpx?: boolean | rem2rpxOptions;
|
|
110
109
|
}
|
|
111
110
|
export type JsHandler = (rawSource: string, set: Set<string>, options?: CreateJsHandlerOptions) => JsHandlerResult;
|
|
112
111
|
export interface IMangleScopeContext {
|
|
@@ -132,10 +131,7 @@ export interface ITemplateHandlerOptions extends ICommonReplaceOptions {
|
|
|
132
131
|
disabledDefaultTemplateHandler?: boolean;
|
|
133
132
|
quote?: string | null;
|
|
134
133
|
}
|
|
135
|
-
export type
|
|
136
|
-
export type InternalUserDefinedOptions = Required<Omit<UserDefinedOptions, GlobOrFunctionMatchers | 'supportCustomLengthUnitsPatch' | 'customReplaceDictionary'> & {
|
|
137
|
-
[K in GlobOrFunctionMatchers]: K extends 'mainCssChunkMatcher' ? (name: string, appType?: AppType) => boolean : (name: string) => boolean;
|
|
138
|
-
} & {
|
|
134
|
+
export type InternalUserDefinedOptions = Required<Omit<UserDefinedOptions, 'supportCustomLengthUnitsPatch' | 'customReplaceDictionary'> & {
|
|
139
135
|
supportCustomLengthUnitsPatch: ILengthUnitsPatchOptions | false;
|
|
140
136
|
templateHandler: (rawSource: string, options?: ITemplateHandlerOptions) => string;
|
|
141
137
|
styleHandler: (rawSource: string, options: IStyleHandlerOptions) => Promise<string>;
|
|
@@ -146,7 +142,7 @@ export type InternalUserDefinedOptions = Required<Omit<UserDefinedOptions, GlobO
|
|
|
146
142
|
setMangleRuntimeSet: (runtimeSet: Set<string>) => void;
|
|
147
143
|
cache: ICreateCacheReturnType;
|
|
148
144
|
}>;
|
|
149
|
-
export type InternalPostcssOptions = Pick<UserDefinedOptions, 'cssMatcher' | 'mainCssChunkMatcher' | 'cssPreflight' | '
|
|
145
|
+
export type InternalPostcssOptions = Pick<UserDefinedOptions, 'cssMatcher' | 'mainCssChunkMatcher' | 'cssPreflight' | 'cssPreflightRange' | 'customRuleCallback' | 'disabled'>;
|
|
150
146
|
export interface IBaseWebpackPlugin {
|
|
151
147
|
options: InternalUserDefinedOptions;
|
|
152
148
|
appType?: AppType;
|
package/dist/utils.d.ts
CHANGED
|
@@ -7,3 +7,12 @@ export declare function groupBy<T>(arr: T[], cb: (arg: T) => string): Record<str
|
|
|
7
7
|
export declare function getGroupedEntries<T>(entries: [string, T][], options: InternalUserDefinedOptions): Record<"css" | "html" | "js" | "other", [string, T][]>;
|
|
8
8
|
export declare function removeExt(file: string): string;
|
|
9
9
|
export { default as defu } from 'defu';
|
|
10
|
+
export declare const defuOverrideArray: <Source extends {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
[x: number]: any;
|
|
13
|
+
[x: symbol]: any;
|
|
14
|
+
}, Defaults extends ({
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
[x: number]: any;
|
|
17
|
+
[x: symbol]: any;
|
|
18
|
+
} | (number | boolean | any[] | Record<never, any> | null | undefined))[]>(source: Source, ...defaults: Defaults) => import("defu").Defu<Source, Defaults>;
|
package/dist/vite.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './vite/index';
|
|
1
|
+
export * from './bundlers/vite/index';
|
package/dist/vite.js
CHANGED
|
@@ -2,25 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var options = require('./options-
|
|
6
|
-
var postcss = require('./postcss-
|
|
7
|
-
var defaults = require('./defaults-
|
|
5
|
+
var options = require('./options-M6TutRrF.js');
|
|
6
|
+
var postcss = require('./postcss-XAQSRPqF.js');
|
|
7
|
+
var defaults = require('./defaults-QOAV8NSV.js');
|
|
8
8
|
var index = require('./index-z25r_Htj.js');
|
|
9
|
-
require('micromatch');
|
|
10
9
|
require('magic-string');
|
|
11
10
|
require('./replace.js');
|
|
12
11
|
require('@weapp-core/escape');
|
|
13
12
|
require('@ast-core/escape');
|
|
14
|
-
require('./shared-
|
|
13
|
+
require('./shared-AxeHlAoJ.js');
|
|
15
14
|
require('@weapp-core/regex');
|
|
16
15
|
require('@babel/generator');
|
|
17
16
|
require('@babel/parser');
|
|
18
17
|
require('@babel/traverse');
|
|
19
|
-
require('./defu-VMJMz2AB.js');
|
|
20
18
|
require('@babel/types');
|
|
21
19
|
require('htmlparser2');
|
|
22
20
|
require('postcss');
|
|
23
|
-
require('@csstools/postcss-is-pseudo-class');
|
|
24
21
|
require('node:path');
|
|
25
22
|
require('node:fs');
|
|
26
23
|
require('semver');
|
|
@@ -28,7 +25,10 @@ require('tailwindcss-patch');
|
|
|
28
25
|
require('@tailwindcss-mangle/shared');
|
|
29
26
|
require('lru-cache');
|
|
30
27
|
require('md5');
|
|
28
|
+
require('@csstools/postcss-is-pseudo-class');
|
|
29
|
+
require('postcss-rem-to-responsive-pixel');
|
|
31
30
|
require('postcss-selector-parser');
|
|
31
|
+
require('./defu-KWuJnZLV.js');
|
|
32
32
|
require('debug');
|
|
33
33
|
|
|
34
34
|
const debug = index.createDebug('generateBundle: ');
|
package/dist/vite.mjs
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
2
|
-
import { v as vitePluginName } from './postcss-
|
|
3
|
-
import { g as getGroupedEntries } from './defaults-
|
|
1
|
+
import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-mJwenBmV.mjs';
|
|
2
|
+
import { v as vitePluginName } from './postcss-kpIT_QQe.mjs';
|
|
3
|
+
import { g as getGroupedEntries } from './defaults-TZpmwtzd.mjs';
|
|
4
4
|
import { c as createDebug } from './index-06BoOZig.mjs';
|
|
5
|
-
import 'micromatch';
|
|
6
5
|
import 'magic-string';
|
|
7
6
|
import './replace.mjs';
|
|
8
7
|
import '@weapp-core/escape';
|
|
9
8
|
import '@ast-core/escape';
|
|
10
|
-
import './shared-
|
|
9
|
+
import './shared-0D5OOeXo.mjs';
|
|
11
10
|
import '@weapp-core/regex';
|
|
12
11
|
import '@babel/generator';
|
|
13
12
|
import '@babel/parser';
|
|
14
13
|
import '@babel/traverse';
|
|
15
|
-
import './defu-NLkZUlr9.mjs';
|
|
16
14
|
import '@babel/types';
|
|
17
15
|
import 'htmlparser2';
|
|
18
16
|
import 'postcss';
|
|
19
|
-
import '@csstools/postcss-is-pseudo-class';
|
|
20
17
|
import 'node:path';
|
|
21
18
|
import 'node:fs';
|
|
22
19
|
import 'semver';
|
|
@@ -24,7 +21,10 @@ import 'tailwindcss-patch';
|
|
|
24
21
|
import '@tailwindcss-mangle/shared';
|
|
25
22
|
import 'lru-cache';
|
|
26
23
|
import 'md5';
|
|
24
|
+
import '@csstools/postcss-is-pseudo-class';
|
|
25
|
+
import 'postcss-rem-to-responsive-pixel';
|
|
27
26
|
import 'postcss-selector-parser';
|
|
27
|
+
import './defu-ms_ZBCiB.mjs';
|
|
28
28
|
import 'debug';
|
|
29
29
|
|
|
30
30
|
const debug = createDebug('generateBundle: ');
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './webpack/index';
|
|
1
|
+
export * from './bundlers/webpack/index';
|
package/dist/webpack.js
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-M6TutRrF.js');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
|
-
var postcss = require('./postcss-
|
|
9
|
-
var defaults = require('./defaults-
|
|
8
|
+
var postcss = require('./postcss-XAQSRPqF.js');
|
|
9
|
+
var defaults = require('./defaults-QOAV8NSV.js');
|
|
10
10
|
var index = require('./index-z25r_Htj.js');
|
|
11
|
-
require('micromatch');
|
|
12
11
|
require('magic-string');
|
|
13
12
|
require('./replace.js');
|
|
14
13
|
require('@weapp-core/escape');
|
|
15
14
|
require('@ast-core/escape');
|
|
16
|
-
require('./shared-
|
|
15
|
+
require('./shared-AxeHlAoJ.js');
|
|
17
16
|
require('@weapp-core/regex');
|
|
18
17
|
require('@babel/generator');
|
|
19
18
|
require('@babel/parser');
|
|
20
19
|
require('@babel/traverse');
|
|
21
|
-
require('./defu-VMJMz2AB.js');
|
|
22
20
|
require('@babel/types');
|
|
23
21
|
require('htmlparser2');
|
|
24
22
|
require('postcss');
|
|
25
|
-
require('@csstools/postcss-is-pseudo-class');
|
|
26
23
|
require('semver');
|
|
27
24
|
require('tailwindcss-patch');
|
|
28
25
|
require('@tailwindcss-mangle/shared');
|
|
29
26
|
require('lru-cache');
|
|
30
27
|
require('md5');
|
|
28
|
+
require('@csstools/postcss-is-pseudo-class');
|
|
29
|
+
require('postcss-rem-to-responsive-pixel');
|
|
31
30
|
require('postcss-selector-parser');
|
|
31
|
+
require('./defu-KWuJnZLV.js');
|
|
32
32
|
require('debug');
|
|
33
33
|
|
|
34
34
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, a as createTailwindcssPatcher, _ as __awaiter } from './options-mJwenBmV.mjs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
|
-
import {
|
|
5
|
-
import { g as getGroupedEntries, r as removeExt } from './defaults-
|
|
4
|
+
import { p as pluginName } from './postcss-kpIT_QQe.mjs';
|
|
5
|
+
import { g as getGroupedEntries, r as removeExt } from './defaults-TZpmwtzd.mjs';
|
|
6
6
|
import { c as createDebug } from './index-06BoOZig.mjs';
|
|
7
|
-
import 'micromatch';
|
|
8
7
|
import 'magic-string';
|
|
9
8
|
import './replace.mjs';
|
|
10
9
|
import '@weapp-core/escape';
|
|
11
10
|
import '@ast-core/escape';
|
|
12
|
-
import './shared-
|
|
11
|
+
import './shared-0D5OOeXo.mjs';
|
|
13
12
|
import '@weapp-core/regex';
|
|
14
13
|
import '@babel/generator';
|
|
15
14
|
import '@babel/parser';
|
|
16
15
|
import '@babel/traverse';
|
|
17
|
-
import './defu-NLkZUlr9.mjs';
|
|
18
16
|
import '@babel/types';
|
|
19
17
|
import 'htmlparser2';
|
|
20
18
|
import 'postcss';
|
|
21
|
-
import '@csstools/postcss-is-pseudo-class';
|
|
22
19
|
import 'semver';
|
|
23
20
|
import 'tailwindcss-patch';
|
|
24
21
|
import '@tailwindcss-mangle/shared';
|
|
25
22
|
import 'lru-cache';
|
|
26
23
|
import 'md5';
|
|
24
|
+
import '@csstools/postcss-is-pseudo-class';
|
|
25
|
+
import 'postcss-rem-to-responsive-pixel';
|
|
27
26
|
import 'postcss-selector-parser';
|
|
27
|
+
import './defu-ms_ZBCiB.mjs';
|
|
28
28
|
import 'debug';
|
|
29
29
|
|
|
30
30
|
const debug = createDebug('processAssets: ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "把tailwindcss jit引擎,带给小程序开发者们! bring tailwindcss jit engine to miniprogram developers!",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@babel/core": "^7.23.3",
|
|
121
121
|
"@icebreakers/cli": "0.1.1",
|
|
122
122
|
"@icebreakers/readme": "0.1.0",
|
|
123
|
-
"@rollup/plugin-alias": "^5.0
|
|
123
|
+
"@rollup/plugin-alias": "^5.1.0",
|
|
124
124
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
125
125
|
"@rollup/plugin-json": "^6.0.1",
|
|
126
126
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -134,16 +134,15 @@
|
|
|
134
134
|
"@types/fs-extra": "^11.0.4",
|
|
135
135
|
"@types/gulp": "^4.0.17",
|
|
136
136
|
"@types/gulp-postcss": "^8.0.6",
|
|
137
|
-
"@types/jest": "^29.5.8",
|
|
138
137
|
"@types/js-beautify": "^1.14.3",
|
|
139
138
|
"@types/klaw": "^3.0.6",
|
|
140
139
|
"@types/loader-utils": "^2.0.6",
|
|
141
|
-
"@types/lodash": "^4.14.
|
|
140
|
+
"@types/lodash": "^4.14.202",
|
|
142
141
|
"@types/md5": "^2.3.5",
|
|
143
|
-
"@types/micromatch": "^4.0.
|
|
144
|
-
"@types/node": "^20.
|
|
145
|
-
"@types/semver": "^7.5.
|
|
146
|
-
"@types/vinyl": "^2.0.
|
|
142
|
+
"@types/micromatch": "^4.0.6",
|
|
143
|
+
"@types/node": "^20.10.0",
|
|
144
|
+
"@types/semver": "^7.5.6",
|
|
145
|
+
"@types/vinyl": "^2.0.11",
|
|
147
146
|
"@types/webpack": "^5.28.5",
|
|
148
147
|
"@types/webpack-sources": "^3.2.3",
|
|
149
148
|
"@vitest/coverage-v8": "^0.34.6",
|
|
@@ -159,7 +158,7 @@
|
|
|
159
158
|
"del": "^7.1.0",
|
|
160
159
|
"diff": "^5.1.0",
|
|
161
160
|
"domhandler": "^5.0.3",
|
|
162
|
-
"eslint": "8.
|
|
161
|
+
"eslint": "8.54.0",
|
|
163
162
|
"eslint-config-icebreaker": "^1.2.2",
|
|
164
163
|
"eslint-config-prettier": "^9.0.0",
|
|
165
164
|
"eslint-plugin-prettier": "^5.0.1",
|
|
@@ -169,44 +168,40 @@
|
|
|
169
168
|
"gulp": "^4.0.2",
|
|
170
169
|
"gulp-postcss": "^9.0.1",
|
|
171
170
|
"html-loader": "^4.2.0",
|
|
172
|
-
"jest": "^29.7.0",
|
|
173
171
|
"js-beautify": "^1.14.11",
|
|
174
172
|
"klaw": "^4.1.0",
|
|
175
173
|
"lodash": "^4.17.21",
|
|
176
174
|
"mini-css-extract-plugin": "^2.7.6",
|
|
177
175
|
"miniprogram-automator": "^0.12.1",
|
|
178
176
|
"pkg-types": "^1.0.3",
|
|
179
|
-
"postcss-load-config": "^4.0.
|
|
177
|
+
"postcss-load-config": "^4.0.2",
|
|
180
178
|
"postcss-loader": "^7.3.3",
|
|
181
|
-
"postcss-rem-to-responsive-pixel": "^5.1.3",
|
|
182
179
|
"prettier": "^3.1.0",
|
|
183
|
-
"promisify-loader-runner": "^1.0.
|
|
184
|
-
"rollup": "^4.
|
|
185
|
-
"rollup-plugin-visualizer": "^5.9.
|
|
180
|
+
"promisify-loader-runner": "^1.0.1",
|
|
181
|
+
"rollup": "^4.6.0",
|
|
182
|
+
"rollup-plugin-visualizer": "^5.9.3",
|
|
186
183
|
"sass": "^1.69.5",
|
|
187
184
|
"style-loader": "^3.3.3",
|
|
188
|
-
"tailwind-children": "^0.5.0",
|
|
189
185
|
"tailwindcss": "^3.3.5",
|
|
190
|
-
"ts-jest": "^29.1.1",
|
|
191
186
|
"ts-node": "^10.9.1",
|
|
192
187
|
"ts-patch": "^3.0.2",
|
|
193
188
|
"tsd": "^0.29.0",
|
|
194
189
|
"tslib": "^2.6.2",
|
|
195
|
-
"typescript": "^5.
|
|
190
|
+
"typescript": "^5.3.2",
|
|
196
191
|
"typescript-transform-paths": "^3.4.6",
|
|
197
192
|
"vinyl": "^3.0.0",
|
|
198
|
-
"vite": "^
|
|
193
|
+
"vite": "^5.0.2",
|
|
199
194
|
"vitest": "^0.34.6",
|
|
200
195
|
"weapp-tailwindcss-children": "^0.1.0",
|
|
201
196
|
"webpack": "^5.89.0",
|
|
202
|
-
"webpack-build-utils": "^0.0.
|
|
197
|
+
"webpack-build-utils": "^0.0.7"
|
|
203
198
|
},
|
|
204
199
|
"dependencies": {
|
|
205
200
|
"@ast-core/escape": "^1.0.1",
|
|
206
|
-
"@babel/generator": "^7.23.
|
|
207
|
-
"@babel/parser": "^7.23.
|
|
208
|
-
"@babel/traverse": "^7.23.
|
|
209
|
-
"@babel/types": "^7.23.
|
|
201
|
+
"@babel/generator": "^7.23.4",
|
|
202
|
+
"@babel/parser": "^7.23.4",
|
|
203
|
+
"@babel/traverse": "^7.23.4",
|
|
204
|
+
"@babel/types": "^7.23.4",
|
|
210
205
|
"@csstools/postcss-is-pseudo-class": "^4.0.3",
|
|
211
206
|
"@tailwindcss-mangle/shared": "^2.2.2",
|
|
212
207
|
"@weapp-core/escape": "^2.0.0",
|
|
@@ -214,11 +209,11 @@
|
|
|
214
209
|
"debug": "^4.3.4",
|
|
215
210
|
"htmlparser2": "^9.0.0",
|
|
216
211
|
"loader-utils": "^2.0.3",
|
|
217
|
-
"lru-cache": "^10.0
|
|
212
|
+
"lru-cache": "^10.1.0",
|
|
218
213
|
"magic-string": "^0.30.5",
|
|
219
214
|
"md5": "^2.3.0",
|
|
220
|
-
"micromatch": "^4.0.5",
|
|
221
215
|
"postcss": "8.4.31",
|
|
216
|
+
"postcss-rem-to-responsive-pixel": "^6.0.1",
|
|
222
217
|
"postcss-selector-parser": "^6.0.13",
|
|
223
218
|
"semver": "^7.5.4",
|
|
224
219
|
"tailwindcss-patch": "^2.2.2"
|
|
@@ -228,23 +223,20 @@
|
|
|
228
223
|
"node": ">=16.6.0"
|
|
229
224
|
},
|
|
230
225
|
"scripts": {
|
|
231
|
-
"dev": "
|
|
232
|
-
"build": "
|
|
233
|
-
"build:demo": "
|
|
226
|
+
"dev": "pnpm clean && pnpm dts && cross-env NODE_ENV=development rollup -c rollup.config.ts --configPlugin typescript -w",
|
|
227
|
+
"build": "pnpm clean && cross-env NODE_ENV=production rollup -c rollup.config.ts --configPlugin typescript && pnpm dts",
|
|
228
|
+
"build:demo": "pnpm demo:del-dist && cross-env NODE_ENV=demo rollup -c rollup.config.ts --configPlugin typescript && pnpm demo:sync-dist",
|
|
234
229
|
"build:tsc": "cross-env NODE_ENV=development tsc --build tsconfig.json",
|
|
235
230
|
"dts": "tsc --emitDeclarationOnly -p tsconfig.dts.json",
|
|
236
|
-
"test": "npm run postinstall &&
|
|
237
|
-
"jest-u": "jest -u",
|
|
238
|
-
"jest:u": "jest -u",
|
|
231
|
+
"test": "npm run postinstall && vitest run",
|
|
239
232
|
"test:dev": "vitest",
|
|
240
233
|
"vitest:coverage": "vitest run --coverage",
|
|
241
234
|
"e2e": "vitest run -c ./vitest.e2e.config.ts",
|
|
242
235
|
"e2e:dev": "vitest -c ./vitest.e2e.config.ts",
|
|
243
236
|
"e2e:u": "vitest run -u -c ./vitest.e2e.config.ts",
|
|
244
|
-
"test:all": "cross-env JEST_INVALID_SKIP_CASES=1 jest",
|
|
245
237
|
"init:rename": "node scripts/init/rename.js",
|
|
246
238
|
"clean": "node scripts/clean.js",
|
|
247
|
-
"debug:web": "cd demo/web &&
|
|
239
|
+
"debug:web": "cd demo/web && pnpm dev",
|
|
248
240
|
"raw": "ts-node scripts/raw",
|
|
249
241
|
"get-decl": "ts-node scripts/get-decl.ts",
|
|
250
242
|
"demo:dev": "node scripts/demo/dev.js",
|
package/dist/postcss/plugin.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PluginCreator } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from "../types";
|
|
3
|
-
export type PostcssWeappTailwindcssRenamePlugin = PluginCreator<IStyleHandlerOptions>;
|
|
4
|
-
declare const postcssWeappTailwindcss: PostcssWeappTailwindcssRenamePlugin;
|
|
5
|
-
export { postcssWeappTailwindcss };
|
|
6
|
-
export { default as postcssIsPseudoClass } from '@csstools/postcss-is-pseudo-class';
|
|
File without changes
|
|
File without changes
|