weapp-tailwindcss 3.0.3 → 3.0.5
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 +6 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +8 -0
- package/dist/cli.js +18 -9
- package/dist/cli.mjs +14 -9
- package/dist/constants.d.ts +1 -0
- package/dist/core.js +4 -4
- package/dist/core.mjs +4 -4
- package/dist/css-macro/index.js +2 -2
- package/dist/css-macro/index.mjs +1 -1
- package/dist/{defaults-QOAV8NSV.js → defaults-1lCMiqik.js} +1 -1
- package/dist/{defaults-TZpmwtzd.mjs → defaults-c-Db9ovX.mjs} +1 -1
- package/dist/defaults.js +2 -2
- package/dist/defaults.mjs +2 -2
- package/dist/{defu-KWuJnZLV.js → defu-6bFjC68s.js} +19 -9
- package/dist/{defu-ms_ZBCiB.mjs → defu-p1R_k1Ss.mjs} +19 -9
- package/dist/gulp.js +7 -68
- package/dist/gulp.mjs +6 -67
- package/dist/index-0jdXviTO.js +142 -0
- package/dist/index-8dmkDRIb.mjs +64 -0
- package/dist/{postcss-bdPbDgs7.js → index-Fkmyt0Rc.js} +3 -1
- package/dist/index-IMKSE35e.js +70 -0
- package/dist/{postcss-MxkGjr8g.mjs → index-_74RBzwy.mjs} +2 -1
- package/dist/{index-z25r_Htj.js → index-juOeq2Kt.js} +1 -1
- package/dist/index-tkvJue1P.mjs +140 -0
- package/dist/index.js +11 -11
- package/dist/index.mjs +7 -7
- package/dist/{options-9bBYg22L.mjs → options-ERHjMNsB.mjs} +3 -3
- package/dist/{options-MDCr-9Qn.js → options-dD1xK3ZL.js} +4 -4
- package/dist/postcss.js +7 -7
- package/dist/postcss.mjs +1 -1
- package/dist/replace.js +5 -5
- package/dist/v5-Lso3d1gN.js +187 -0
- package/dist/v5-d_Ek52tu.mjs +180 -0
- package/dist/vite.js +11 -142
- package/dist/vite.mjs +9 -144
- package/dist/weapp-tw-runtime-loader.js +1 -1
- package/dist/webpack.js +12 -186
- package/dist/webpack.mjs +11 -184
- package/dist/webpack4.d.ts +1 -0
- package/dist/webpack4.js +208 -0
- package/dist/webpack4.mjs +199 -0
- package/package.json +46 -37
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-ERHjMNsB.mjs';
|
|
2
|
+
import stream from 'node:stream';
|
|
3
|
+
|
|
4
|
+
const Transform = stream.Transform;
|
|
5
|
+
function createPlugins(options = {}) {
|
|
6
|
+
const opts = getOptions(options);
|
|
7
|
+
const { templateHandler, styleHandler, patch, jsHandler, setMangleRuntimeSet, tailwindcssBasedir } = opts;
|
|
8
|
+
let runtimeSet = new Set();
|
|
9
|
+
patch === null || patch === void 0 ? void 0 : patch();
|
|
10
|
+
const twPatcher = createTailwindcssPatcher();
|
|
11
|
+
function transformWxss() {
|
|
12
|
+
const transformStream = new Transform({ objectMode: true });
|
|
13
|
+
transformStream._transform = function (file, encoding, callback) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
runtimeSet = twPatcher.getClassSet({
|
|
16
|
+
basedir: tailwindcssBasedir
|
|
17
|
+
});
|
|
18
|
+
setMangleRuntimeSet(runtimeSet);
|
|
19
|
+
const error = null;
|
|
20
|
+
if (file.contents) {
|
|
21
|
+
const code = yield styleHandler(file.contents.toString(), {
|
|
22
|
+
isMainChunk: true
|
|
23
|
+
});
|
|
24
|
+
file.contents = Buffer.from(code);
|
|
25
|
+
}
|
|
26
|
+
callback(error, file);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return transformStream;
|
|
30
|
+
}
|
|
31
|
+
function transformJs() {
|
|
32
|
+
const transformStream = new Transform({ objectMode: true });
|
|
33
|
+
transformStream._transform = function (file, encoding, callback) {
|
|
34
|
+
const error = null;
|
|
35
|
+
if (file.contents) {
|
|
36
|
+
const { code } = jsHandler(file.contents.toString(), runtimeSet);
|
|
37
|
+
file.contents = Buffer.from(code);
|
|
38
|
+
}
|
|
39
|
+
callback(error, file);
|
|
40
|
+
};
|
|
41
|
+
return transformStream;
|
|
42
|
+
}
|
|
43
|
+
function transformWxml() {
|
|
44
|
+
const transformStream = new Transform({ objectMode: true });
|
|
45
|
+
transformStream._transform = function (file, encoding, callback) {
|
|
46
|
+
const error = null;
|
|
47
|
+
if (file.contents) {
|
|
48
|
+
const code = templateHandler(file.contents.toString(), {
|
|
49
|
+
runtimeSet
|
|
50
|
+
});
|
|
51
|
+
file.contents = Buffer.from(code);
|
|
52
|
+
}
|
|
53
|
+
callback(error, file);
|
|
54
|
+
};
|
|
55
|
+
return transformStream;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
transformWxss,
|
|
59
|
+
transformWxml,
|
|
60
|
+
transformJs
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { createPlugins as c };
|
|
@@ -6,7 +6,7 @@ var selectorParser = require('postcss-selector-parser');
|
|
|
6
6
|
var shared = require('./shared-AxeHlAoJ.js');
|
|
7
7
|
var postcss = require('postcss');
|
|
8
8
|
|
|
9
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : {
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
11
11
|
var postcssIsPseudoClass__default = /*#__PURE__*/_interopDefaultCompat(postcssIsPseudoClass);
|
|
12
12
|
var postcssRem2rpx__default = /*#__PURE__*/_interopDefaultCompat(postcssRem2rpx);
|
|
@@ -380,6 +380,7 @@ function commonChunkPreflight(node, options) {
|
|
|
380
380
|
const postcssPlugin = 'postcss-weapp-tailwindcss-rename-plugin';
|
|
381
381
|
const pluginName = 'weapp-tailwindcss-webpack-plugin';
|
|
382
382
|
const vitePluginName = 'vite-plugin-uni-app-weapp-tailwindcss-adaptor';
|
|
383
|
+
const WEAPP_TW_REQUIRED_NODE_VERSION = '16.6.0';
|
|
383
384
|
|
|
384
385
|
function isAtMediaHover(atRule) {
|
|
385
386
|
return /media\(\s*hover\s*:\s*hover\s*\)/.test(atRule.name) || (atRule.name === 'media' && /\(\s*hover\s*:\s*hover\s*\)/.test(atRule.params));
|
|
@@ -486,6 +487,7 @@ function getPlugins(options) {
|
|
|
486
487
|
return plugins;
|
|
487
488
|
}
|
|
488
489
|
|
|
490
|
+
exports.WEAPP_TW_REQUIRED_NODE_VERSION = WEAPP_TW_REQUIRED_NODE_VERSION;
|
|
489
491
|
exports.getPlugins = getPlugins;
|
|
490
492
|
exports.pluginName = pluginName;
|
|
491
493
|
exports.postcssWeappTailwindcssPostPlugin = postcssWeappTailwindcssPostPlugin;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var options = require('./options-dD1xK3ZL.js');
|
|
4
|
+
var stream = require('node:stream');
|
|
5
|
+
|
|
6
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var stream__default = /*#__PURE__*/_interopDefaultCompat(stream);
|
|
9
|
+
|
|
10
|
+
const Transform = stream__default["default"].Transform;
|
|
11
|
+
function createPlugins(options$1 = {}) {
|
|
12
|
+
const opts = options.getOptions(options$1);
|
|
13
|
+
const { templateHandler, styleHandler, patch, jsHandler, setMangleRuntimeSet, tailwindcssBasedir } = opts;
|
|
14
|
+
let runtimeSet = new Set();
|
|
15
|
+
patch === null || patch === void 0 ? void 0 : patch();
|
|
16
|
+
const twPatcher = options.createTailwindcssPatcher();
|
|
17
|
+
function transformWxss() {
|
|
18
|
+
const transformStream = new Transform({ objectMode: true });
|
|
19
|
+
transformStream._transform = function (file, encoding, callback) {
|
|
20
|
+
return options.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
runtimeSet = twPatcher.getClassSet({
|
|
22
|
+
basedir: tailwindcssBasedir
|
|
23
|
+
});
|
|
24
|
+
setMangleRuntimeSet(runtimeSet);
|
|
25
|
+
const error = null;
|
|
26
|
+
if (file.contents) {
|
|
27
|
+
const code = yield styleHandler(file.contents.toString(), {
|
|
28
|
+
isMainChunk: true
|
|
29
|
+
});
|
|
30
|
+
file.contents = Buffer.from(code);
|
|
31
|
+
}
|
|
32
|
+
callback(error, file);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
return transformStream;
|
|
36
|
+
}
|
|
37
|
+
function transformJs() {
|
|
38
|
+
const transformStream = new Transform({ objectMode: true });
|
|
39
|
+
transformStream._transform = function (file, encoding, callback) {
|
|
40
|
+
const error = null;
|
|
41
|
+
if (file.contents) {
|
|
42
|
+
const { code } = jsHandler(file.contents.toString(), runtimeSet);
|
|
43
|
+
file.contents = Buffer.from(code);
|
|
44
|
+
}
|
|
45
|
+
callback(error, file);
|
|
46
|
+
};
|
|
47
|
+
return transformStream;
|
|
48
|
+
}
|
|
49
|
+
function transformWxml() {
|
|
50
|
+
const transformStream = new Transform({ objectMode: true });
|
|
51
|
+
transformStream._transform = function (file, encoding, callback) {
|
|
52
|
+
const error = null;
|
|
53
|
+
if (file.contents) {
|
|
54
|
+
const code = templateHandler(file.contents.toString(), {
|
|
55
|
+
runtimeSet
|
|
56
|
+
});
|
|
57
|
+
file.contents = Buffer.from(code);
|
|
58
|
+
}
|
|
59
|
+
callback(error, file);
|
|
60
|
+
};
|
|
61
|
+
return transformStream;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
transformWxss,
|
|
65
|
+
transformWxml,
|
|
66
|
+
transformJs
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
exports.createPlugins = createPlugins;
|
|
@@ -372,6 +372,7 @@ function commonChunkPreflight(node, options) {
|
|
|
372
372
|
const postcssPlugin = 'postcss-weapp-tailwindcss-rename-plugin';
|
|
373
373
|
const pluginName = 'weapp-tailwindcss-webpack-plugin';
|
|
374
374
|
const vitePluginName = 'vite-plugin-uni-app-weapp-tailwindcss-adaptor';
|
|
375
|
+
const WEAPP_TW_REQUIRED_NODE_VERSION = '16.6.0';
|
|
375
376
|
|
|
376
377
|
function isAtMediaHover(atRule) {
|
|
377
378
|
return /media\(\s*hover\s*:\s*hover\s*\)/.test(atRule.name) || (atRule.name === 'media' && /\(\s*hover\s*:\s*hover\s*\)/.test(atRule.params));
|
|
@@ -478,4 +479,4 @@ function getPlugins(options) {
|
|
|
478
479
|
return plugins;
|
|
479
480
|
}
|
|
480
481
|
|
|
481
|
-
export {
|
|
482
|
+
export { WEAPP_TW_REQUIRED_NODE_VERSION as W, postcssWeappTailwindcssPrePlugin as a, pluginName as b, getPlugins as g, postcssWeappTailwindcssPostPlugin as p, vitePluginName as v };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _createDebug = require('debug');
|
|
4
4
|
|
|
5
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : {
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
6
|
|
|
7
7
|
var _createDebug__default = /*#__PURE__*/_interopDefaultCompat(_createDebug);
|
|
8
8
|
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { g as getOptions, c as createTailwindcssPatcher, _ as __awaiter } from './options-ERHjMNsB.mjs';
|
|
2
|
+
import { v as vitePluginName } from './index-_74RBzwy.mjs';
|
|
3
|
+
import { g as getGroupedEntries } from './defaults-c-Db9ovX.mjs';
|
|
4
|
+
import { c as createDebug } from './index-06BoOZig.mjs';
|
|
5
|
+
|
|
6
|
+
const debug = createDebug('generateBundle: ');
|
|
7
|
+
function UnifiedViteWeappTailwindcssPlugin(options = {}) {
|
|
8
|
+
if (options.customReplaceDictionary === undefined) {
|
|
9
|
+
options.customReplaceDictionary = 'simple';
|
|
10
|
+
}
|
|
11
|
+
const opts = getOptions(options);
|
|
12
|
+
const { disabled, onEnd, onLoad, onStart, onUpdate, templateHandler, styleHandler, patch, jsHandler, mainCssChunkMatcher, appType, setMangleRuntimeSet, cache, tailwindcssBasedir } = opts;
|
|
13
|
+
if (disabled) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
patch === null || patch === void 0 ? void 0 : patch();
|
|
17
|
+
const twPatcher = createTailwindcssPatcher();
|
|
18
|
+
onLoad();
|
|
19
|
+
return {
|
|
20
|
+
name: vitePluginName,
|
|
21
|
+
enforce: 'post',
|
|
22
|
+
generateBundle(opt, bundle) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
debug('start');
|
|
25
|
+
onStart();
|
|
26
|
+
const entries = Object.entries(bundle);
|
|
27
|
+
const groupedEntries = getGroupedEntries(entries, opts);
|
|
28
|
+
const runtimeSet = twPatcher.getClassSet({
|
|
29
|
+
basedir: tailwindcssBasedir
|
|
30
|
+
});
|
|
31
|
+
setMangleRuntimeSet(runtimeSet);
|
|
32
|
+
debug('get runtimeSet, class count: %d', runtimeSet.size);
|
|
33
|
+
if (Array.isArray(groupedEntries.html)) {
|
|
34
|
+
let noCachedCount = 0;
|
|
35
|
+
for (let i = 0; i < groupedEntries.html.length; i++) {
|
|
36
|
+
const [file, originalSource] = groupedEntries.html[i];
|
|
37
|
+
const oldVal = originalSource.source.toString();
|
|
38
|
+
const hash = cache.computeHash(oldVal);
|
|
39
|
+
cache.calcHashValueChanged(file, hash);
|
|
40
|
+
yield cache.process(file, () => {
|
|
41
|
+
const source = cache.get(file);
|
|
42
|
+
if (source) {
|
|
43
|
+
originalSource.source = source;
|
|
44
|
+
debug('html cache hit: %s', file);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}, () => {
|
|
50
|
+
originalSource.source = templateHandler(oldVal, {
|
|
51
|
+
runtimeSet
|
|
52
|
+
});
|
|
53
|
+
onUpdate(file, oldVal, originalSource.source);
|
|
54
|
+
debug('html handle: %s', file);
|
|
55
|
+
noCachedCount++;
|
|
56
|
+
return {
|
|
57
|
+
key: file,
|
|
58
|
+
source: originalSource.source
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
debug('html handle finish, total: %d, no-cached: %d', groupedEntries.html.length, noCachedCount);
|
|
63
|
+
}
|
|
64
|
+
if (Array.isArray(groupedEntries.js)) {
|
|
65
|
+
let noCachedCount = 0;
|
|
66
|
+
for (let i = 0; i < groupedEntries.js.length; i++) {
|
|
67
|
+
const [file, originalSource] = groupedEntries.js[i];
|
|
68
|
+
const rawSource = originalSource.code;
|
|
69
|
+
const hash = cache.computeHash(rawSource);
|
|
70
|
+
cache.calcHashValueChanged(file, hash);
|
|
71
|
+
yield cache.process(file, () => {
|
|
72
|
+
const source = cache.get(file);
|
|
73
|
+
if (source) {
|
|
74
|
+
originalSource.code = source;
|
|
75
|
+
debug('js cache hit: %s', file);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}, () => {
|
|
81
|
+
const mapFilename = file + '.map';
|
|
82
|
+
const hasMap = Boolean(bundle[mapFilename]);
|
|
83
|
+
const { code, map } = jsHandler(rawSource, runtimeSet, {
|
|
84
|
+
generateMap: hasMap
|
|
85
|
+
});
|
|
86
|
+
originalSource.code = code;
|
|
87
|
+
onUpdate(file, rawSource, code);
|
|
88
|
+
debug('js handle: %s', file);
|
|
89
|
+
noCachedCount++;
|
|
90
|
+
if (hasMap && map) {
|
|
91
|
+
bundle[mapFilename].source = map.toString();
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
key: file,
|
|
95
|
+
source: code
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
debug('js handle finish, total: %d, no-cached: %d', groupedEntries.js.length, noCachedCount);
|
|
100
|
+
}
|
|
101
|
+
if (Array.isArray(groupedEntries.css)) {
|
|
102
|
+
let noCachedCount = 0;
|
|
103
|
+
for (let i = 0; i < groupedEntries.css.length; i++) {
|
|
104
|
+
const [file, originalSource] = groupedEntries.css[i];
|
|
105
|
+
const rawSource = originalSource.source.toString();
|
|
106
|
+
const hash = cache.computeHash(rawSource);
|
|
107
|
+
cache.calcHashValueChanged(file, hash);
|
|
108
|
+
yield cache.process(file, () => {
|
|
109
|
+
const source = cache.get(file);
|
|
110
|
+
if (source) {
|
|
111
|
+
originalSource.source = source;
|
|
112
|
+
debug('css cache hit: %s', file);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
}, () => __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const css = yield styleHandler(rawSource, {
|
|
119
|
+
isMainChunk: mainCssChunkMatcher(originalSource.fileName, appType)
|
|
120
|
+
});
|
|
121
|
+
originalSource.source = css;
|
|
122
|
+
onUpdate(file, rawSource, css);
|
|
123
|
+
debug('css handle: %s', file);
|
|
124
|
+
noCachedCount++;
|
|
125
|
+
return {
|
|
126
|
+
key: file,
|
|
127
|
+
source: css
|
|
128
|
+
};
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
debug('css handle finish, total: %d, no-cached: %d', groupedEntries.css.length, noCachedCount);
|
|
132
|
+
}
|
|
133
|
+
onEnd();
|
|
134
|
+
debug('end');
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { UnifiedViteWeappTailwindcssPlugin as U };
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-Lso3d1gN.js');
|
|
6
|
+
var index = require('./index-0jdXviTO.js');
|
|
7
|
+
var index$1 = require('./index-IMKSE35e.js');
|
|
8
|
+
require('./options-dD1xK3ZL.js');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('./replace.js');
|
|
11
11
|
require('@weapp-core/escape');
|
|
@@ -15,12 +15,12 @@ require('@weapp-core/regex');
|
|
|
15
15
|
require('@babel/generator');
|
|
16
16
|
require('@babel/parser');
|
|
17
17
|
require('@babel/traverse');
|
|
18
|
-
require('./defaults-
|
|
19
|
-
require('./defu-
|
|
18
|
+
require('./defaults-1lCMiqik.js');
|
|
19
|
+
require('./defu-6bFjC68s.js');
|
|
20
20
|
require('@babel/types');
|
|
21
21
|
require('htmlparser2');
|
|
22
22
|
require('postcss');
|
|
23
|
-
require('./
|
|
23
|
+
require('./index-Fkmyt0Rc.js');
|
|
24
24
|
require('@csstools/postcss-is-pseudo-class');
|
|
25
25
|
require('postcss-rem-to-responsive-pixel');
|
|
26
26
|
require('postcss-selector-parser');
|
|
@@ -31,12 +31,12 @@ require('tailwindcss-patch');
|
|
|
31
31
|
require('@tailwindcss-mangle/shared');
|
|
32
32
|
require('lru-cache');
|
|
33
33
|
require('md5');
|
|
34
|
-
require('./index-
|
|
34
|
+
require('./index-juOeq2Kt.js');
|
|
35
35
|
require('debug');
|
|
36
36
|
require('node:stream');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
exports.UnifiedWebpackPluginV5 =
|
|
41
|
-
exports.UnifiedViteWeappTailwindcssPlugin =
|
|
42
|
-
exports.createPlugins =
|
|
40
|
+
exports.UnifiedWebpackPluginV5 = v5.UnifiedWebpackPluginV5;
|
|
41
|
+
exports.UnifiedViteWeappTailwindcssPlugin = index.UnifiedViteWeappTailwindcssPlugin;
|
|
42
|
+
exports.createPlugins = index$1.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { UnifiedWebpackPluginV5 } from './
|
|
2
|
-
export { UnifiedViteWeappTailwindcssPlugin } from './
|
|
3
|
-
export { createPlugins } from './
|
|
4
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-d_Ek52tu.mjs';
|
|
2
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-tkvJue1P.mjs';
|
|
3
|
+
export { c as createPlugins } from './index-8dmkDRIb.mjs';
|
|
4
|
+
import './options-ERHjMNsB.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import './replace.mjs';
|
|
7
7
|
import '@weapp-core/escape';
|
|
@@ -11,12 +11,12 @@ import '@weapp-core/regex';
|
|
|
11
11
|
import '@babel/generator';
|
|
12
12
|
import '@babel/parser';
|
|
13
13
|
import '@babel/traverse';
|
|
14
|
-
import './defaults-
|
|
15
|
-
import './defu-
|
|
14
|
+
import './defaults-c-Db9ovX.mjs';
|
|
15
|
+
import './defu-p1R_k1Ss.mjs';
|
|
16
16
|
import '@babel/types';
|
|
17
17
|
import 'htmlparser2';
|
|
18
18
|
import 'postcss';
|
|
19
|
-
import './
|
|
19
|
+
import './index-_74RBzwy.mjs';
|
|
20
20
|
import '@csstools/postcss-is-pseudo-class';
|
|
21
21
|
import 'postcss-rem-to-responsive-pixel';
|
|
22
22
|
import 'postcss-selector-parser';
|
|
@@ -6,11 +6,11 @@ import { jsStringEscape } from '@ast-core/escape';
|
|
|
6
6
|
import generate from '@babel/generator';
|
|
7
7
|
import { parse, parseExpression } from '@babel/parser';
|
|
8
8
|
import traverse from '@babel/traverse';
|
|
9
|
-
import { d as defuOverrideArray, n as noop, a as defaultOptions, i as isMap } from './defaults-
|
|
9
|
+
import { d as defuOverrideArray, n as noop, a as defaultOptions, i as isMap } from './defaults-c-Db9ovX.mjs';
|
|
10
10
|
import * as t from '@babel/types';
|
|
11
11
|
import { Parser } from 'htmlparser2';
|
|
12
12
|
import postcss from 'postcss';
|
|
13
|
-
import { g as getPlugins } from './
|
|
13
|
+
import { g as getPlugins } from './index-_74RBzwy.mjs';
|
|
14
14
|
import path from 'node:path';
|
|
15
15
|
import fs from 'node:fs';
|
|
16
16
|
import { gte } from 'semver';
|
|
@@ -687,4 +687,4 @@ function getOptions(options = {}) {
|
|
|
687
687
|
return result;
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
-
export { __awaiter as _,
|
|
690
|
+
export { __awaiter as _, createPatch as a, createTailwindcssPatcher as c, getOptions as g };
|
|
@@ -8,11 +8,11 @@ var escape = require('@ast-core/escape');
|
|
|
8
8
|
var generate = require('@babel/generator');
|
|
9
9
|
var parser = require('@babel/parser');
|
|
10
10
|
var traverse = require('@babel/traverse');
|
|
11
|
-
var defaults = require('./defaults-
|
|
11
|
+
var defaults = require('./defaults-1lCMiqik.js');
|
|
12
12
|
var t = require('@babel/types');
|
|
13
13
|
var htmlparser2 = require('htmlparser2');
|
|
14
14
|
var postcss = require('postcss');
|
|
15
|
-
var
|
|
15
|
+
var index = require('./index-Fkmyt0Rc.js');
|
|
16
16
|
var path = require('node:path');
|
|
17
17
|
var fs = require('node:fs');
|
|
18
18
|
var semver = require('semver');
|
|
@@ -21,7 +21,7 @@ var shared = require('@tailwindcss-mangle/shared');
|
|
|
21
21
|
var lruCache = require('lru-cache');
|
|
22
22
|
var md5 = require('md5');
|
|
23
23
|
|
|
24
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : {
|
|
24
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
25
25
|
|
|
26
26
|
function _interopNamespaceCompat(e) {
|
|
27
27
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -394,7 +394,7 @@ function createTemplateHandler(options = {}) {
|
|
|
394
394
|
|
|
395
395
|
function styleHandler(rawSource, options) {
|
|
396
396
|
return __awaiter(this, void 0, void 0, function* () {
|
|
397
|
-
return (yield postcss__default["default"](
|
|
397
|
+
return (yield postcss__default["default"](index.getPlugins(options)).process(rawSource).async()).css;
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
400
|
function createStyleHandler(options) {
|
package/dist/postcss.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var index = require('./index-Fkmyt0Rc.js');
|
|
6
6
|
var postcssIsPseudoClass = require('@csstools/postcss-is-pseudo-class');
|
|
7
7
|
var postcssRem2rpx = require('postcss-rem-to-responsive-pixel');
|
|
8
8
|
require('postcss-selector-parser');
|
|
@@ -11,21 +11,21 @@ require('@weapp-core/escape');
|
|
|
11
11
|
require('@ast-core/escape');
|
|
12
12
|
require('postcss');
|
|
13
13
|
|
|
14
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : {
|
|
14
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
15
|
|
|
16
16
|
var postcssIsPseudoClass__default = /*#__PURE__*/_interopDefaultCompat(postcssIsPseudoClass);
|
|
17
17
|
var postcssRem2rpx__default = /*#__PURE__*/_interopDefaultCompat(postcssRem2rpx);
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.getPlugins =
|
|
22
|
-
exports.postcssWeappTailwindcssPostPlugin =
|
|
23
|
-
exports.postcssWeappTailwindcssPrePlugin =
|
|
24
|
-
Object.defineProperty(exports,
|
|
21
|
+
exports.getPlugins = index.getPlugins;
|
|
22
|
+
exports.postcssWeappTailwindcssPostPlugin = index.postcssWeappTailwindcssPostPlugin;
|
|
23
|
+
exports.postcssWeappTailwindcssPrePlugin = index.postcssWeappTailwindcssPrePlugin;
|
|
24
|
+
Object.defineProperty(exports, "postcssIsPseudoClass", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function () { return postcssIsPseudoClass__default["default"]; }
|
|
27
27
|
});
|
|
28
|
-
Object.defineProperty(exports,
|
|
28
|
+
Object.defineProperty(exports, "postcssRem2rpx", {
|
|
29
29
|
enumerable: true,
|
|
30
30
|
get: function () { return postcssRem2rpx__default["default"]; }
|
|
31
31
|
});
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as getPlugins,
|
|
1
|
+
export { g as getPlugins, p as postcssWeappTailwindcssPostPlugin, a as postcssWeappTailwindcssPrePlugin } from './index-_74RBzwy.mjs';
|
|
2
2
|
export { default as postcssIsPseudoClass } from '@csstools/postcss-is-pseudo-class';
|
|
3
3
|
export { default as postcssRem2rpx } from 'postcss-rem-to-responsive-pixel';
|
|
4
4
|
import 'postcss-selector-parser';
|
package/dist/replace.js
CHANGED
|
@@ -25,23 +25,23 @@ function replaceWxml(original, options = {
|
|
|
25
25
|
return res;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
Object.defineProperty(exports,
|
|
28
|
+
Object.defineProperty(exports, "MappingChars2String", {
|
|
29
29
|
enumerable: true,
|
|
30
30
|
get: function () { return escape.MappingChars2String; }
|
|
31
31
|
});
|
|
32
|
-
Object.defineProperty(exports,
|
|
32
|
+
Object.defineProperty(exports, "MappingChars2StringEntries", {
|
|
33
33
|
enumerable: true,
|
|
34
34
|
get: function () { return escape.MappingChars2StringEntries; }
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports,
|
|
36
|
+
Object.defineProperty(exports, "SYMBOL_TABLE", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function () { return escape.SYMBOL_TABLE; }
|
|
39
39
|
});
|
|
40
|
-
Object.defineProperty(exports,
|
|
40
|
+
Object.defineProperty(exports, "SimpleMappingChars2String", {
|
|
41
41
|
enumerable: true,
|
|
42
42
|
get: function () { return escape.SimpleMappingChars2String; }
|
|
43
43
|
});
|
|
44
|
-
Object.defineProperty(exports,
|
|
44
|
+
Object.defineProperty(exports, "SimpleMappingChars2StringEntries", {
|
|
45
45
|
enumerable: true,
|
|
46
46
|
get: function () { return escape.SimpleMappingChars2StringEntries; }
|
|
47
47
|
});
|