weapp-tailwindcss 3.7.0-alpha.1 → 3.7.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.
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/gulp.js +2 -2
- package/dist/gulp.mjs +2 -2
- package/dist/{index-Da8_sCz_.js → index-BTXkyxen.js} +1 -1
- package/dist/{index-DQWPK2Gk.mjs → index-C0QsyqD6.mjs} +1 -1
- package/dist/{index-BE6wE0No.js → index-ClSBbhnm.js} +1 -1
- package/dist/{index-CoTUirpU.mjs → index-DoMb0-xW.mjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{options-DW1MHPWk.js → options-Bv-1GQJY.js} +16 -2
- package/dist/{options-B9bqXmm1.mjs → options-yXyCFCtr.mjs} +16 -2
- package/dist/{v5-Bil5avxf.js → v5-DwFXG7m_.js} +1 -1
- package/dist/{v5-D0HXtisF.mjs → v5-N5BYJ5JY.mjs} +1 -1
- package/dist/vite.js +2 -2
- package/dist/vite.mjs +2 -2
- package/dist/webpack.js +2 -2
- package/dist/webpack.mjs +2 -2
- package/dist/webpack4.js +1 -1
- package/dist/webpack4.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var process$1 = require('node:process');
|
|
4
4
|
var semver = require('semver');
|
|
5
5
|
var index = require('./index-h2-ZMO3S.js');
|
|
6
|
-
var options = require('./options-
|
|
6
|
+
var options = require('./options-Bv-1GQJY.js');
|
|
7
7
|
var require$$0$2 = require('fs');
|
|
8
8
|
var require$$0 = require('constants');
|
|
9
9
|
var require$$0$1 = require('stream');
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process$1 from 'node:process';
|
|
2
2
|
import semver from 'semver';
|
|
3
3
|
import { W as WEAPP_TW_REQUIRED_NODE_VERSION } from './index-BF8k8rHr.mjs';
|
|
4
|
-
import { _ as __awaiter, l as logger, g as getOptions } from './options-
|
|
4
|
+
import { _ as __awaiter, l as logger, g as getOptions } from './options-yXyCFCtr.mjs';
|
|
5
5
|
import require$$0$2 from 'fs';
|
|
6
6
|
import require$$0 from 'constants';
|
|
7
7
|
import require$$0$1 from 'stream';
|
package/dist/core.js
CHANGED
package/dist/core.mjs
CHANGED
package/dist/gulp.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-ClSBbhnm.js');
|
|
6
|
+
require('./options-Bv-1GQJY.js');
|
|
7
7
|
require('lru-cache');
|
|
8
8
|
require('md5');
|
|
9
9
|
require('./defaults-CdqzSWsR.js');
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-yXyCFCtr.mjs';
|
|
2
2
|
import { v as vitePluginName } from './index-BF8k8rHr.mjs';
|
|
3
3
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
|
4
4
|
import { g as getGroupedEntries } from './defaults-5A8JI2hW.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-yXyCFCtr.mjs';
|
|
2
2
|
import { Buffer } from 'node:buffer';
|
|
3
3
|
import stream from 'node:stream';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
var index$1 = require('./index-
|
|
7
|
-
var v5 = require('./v5-
|
|
8
|
-
require('./options-
|
|
5
|
+
var index = require('./index-ClSBbhnm.js');
|
|
6
|
+
var index$1 = require('./index-BTXkyxen.js');
|
|
7
|
+
var v5 = require('./v5-DwFXG7m_.js');
|
|
8
|
+
require('./options-Bv-1GQJY.js');
|
|
9
9
|
require('lru-cache');
|
|
10
10
|
require('md5');
|
|
11
11
|
require('./defaults-CdqzSWsR.js');
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as createPlugins } from './index-
|
|
2
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
3
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
4
|
-
import './options-
|
|
1
|
+
export { c as createPlugins } from './index-DoMb0-xW.mjs';
|
|
2
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-C0QsyqD6.mjs';
|
|
3
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-N5BYJ5JY.mjs';
|
|
4
|
+
import './options-yXyCFCtr.mjs';
|
|
5
5
|
import 'lru-cache';
|
|
6
6
|
import 'md5';
|
|
7
7
|
import './defaults-5A8JI2hW.mjs';
|
|
@@ -241,6 +241,7 @@ function replaceHandleValue(str, node, options, ms, offset = 0) {
|
|
|
241
241
|
return rawStr;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
const ignoreIdentifier = 'weappTwIgnore';
|
|
244
245
|
function astGrepUpdateString(ast, options, ms) {
|
|
245
246
|
return __awaiter(this, void 0, void 0, function* () {
|
|
246
247
|
const js = yield getAstGrep();
|
|
@@ -255,6 +256,13 @@ function astGrepUpdateString(ast, options, ms) {
|
|
|
255
256
|
}
|
|
256
257
|
const templateNodes = ast.findAll(js.kind('template_string'));
|
|
257
258
|
for (const node of templateNodes) {
|
|
259
|
+
const p = node.parent();
|
|
260
|
+
if (p && p.kind() === 'call_expression') {
|
|
261
|
+
const c = p.child(0);
|
|
262
|
+
if (c && c.kind() === 'identifier' && c.text() === ignoreIdentifier) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
258
266
|
const fragments = node.findAll(js.kind('string_fragment'));
|
|
259
267
|
for (const fragment of fragments) {
|
|
260
268
|
const range = fragment.range();
|
|
@@ -292,8 +300,14 @@ function jsHandler(rawSource, options) {
|
|
|
292
300
|
},
|
|
293
301
|
TemplateElement: {
|
|
294
302
|
enter(p) {
|
|
295
|
-
if (p.parentPath.isTemplateLiteral()
|
|
296
|
-
|
|
303
|
+
if (p.parentPath.isTemplateLiteral()) {
|
|
304
|
+
if ((p.parentPath.parentPath.isTaggedTemplateExpression()
|
|
305
|
+
&& p.parentPath.parentPath.get('tag').isIdentifier({
|
|
306
|
+
name: ignoreIdentifier,
|
|
307
|
+
}))
|
|
308
|
+
|| isEvalPath(p.parentPath.parentPath)) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
297
311
|
}
|
|
298
312
|
const n = p.node;
|
|
299
313
|
replaceHandleValue(n.value.raw, n, Object.assign(Object.assign({}, options), { needEscaped: false }), ms, 0);
|
|
@@ -210,6 +210,7 @@ function replaceHandleValue(str, node, options, ms, offset = 0) {
|
|
|
210
210
|
return rawStr;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
const ignoreIdentifier = 'weappTwIgnore';
|
|
213
214
|
function astGrepUpdateString(ast, options, ms) {
|
|
214
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
216
|
const js = yield getAstGrep();
|
|
@@ -224,6 +225,13 @@ function astGrepUpdateString(ast, options, ms) {
|
|
|
224
225
|
}
|
|
225
226
|
const templateNodes = ast.findAll(js.kind('template_string'));
|
|
226
227
|
for (const node of templateNodes) {
|
|
228
|
+
const p = node.parent();
|
|
229
|
+
if (p && p.kind() === 'call_expression') {
|
|
230
|
+
const c = p.child(0);
|
|
231
|
+
if (c && c.kind() === 'identifier' && c.text() === ignoreIdentifier) {
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
227
235
|
const fragments = node.findAll(js.kind('string_fragment'));
|
|
228
236
|
for (const fragment of fragments) {
|
|
229
237
|
const range = fragment.range();
|
|
@@ -261,8 +269,14 @@ function jsHandler(rawSource, options) {
|
|
|
261
269
|
},
|
|
262
270
|
TemplateElement: {
|
|
263
271
|
enter(p) {
|
|
264
|
-
if (p.parentPath.isTemplateLiteral()
|
|
265
|
-
|
|
272
|
+
if (p.parentPath.isTemplateLiteral()) {
|
|
273
|
+
if ((p.parentPath.parentPath.isTaggedTemplateExpression()
|
|
274
|
+
&& p.parentPath.parentPath.get('tag').isIdentifier({
|
|
275
|
+
name: ignoreIdentifier,
|
|
276
|
+
}))
|
|
277
|
+
|| isEvalPath(p.parentPath.parentPath)) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
266
280
|
}
|
|
267
281
|
const n = p.node;
|
|
268
282
|
replaceHandleValue(n.value.raw, n, Object.assign(Object.assign({}, options), { needEscaped: false }), ms, 0);
|
package/dist/vite.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-BTXkyxen.js');
|
|
6
|
+
require('./options-Bv-1GQJY.js');
|
|
7
7
|
require('lru-cache');
|
|
8
8
|
require('md5');
|
|
9
9
|
require('./defaults-CdqzSWsR.js');
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-C0QsyqD6.mjs';
|
|
2
|
+
import './options-yXyCFCtr.mjs';
|
|
3
3
|
import 'lru-cache';
|
|
4
4
|
import 'md5';
|
|
5
5
|
import './defaults-5A8JI2hW.mjs';
|
package/dist/webpack.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-DwFXG7m_.js');
|
|
6
|
+
require('./options-Bv-1GQJY.js');
|
|
7
7
|
require('lru-cache');
|
|
8
8
|
require('md5');
|
|
9
9
|
require('./defaults-CdqzSWsR.js');
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-N5BYJ5JY.mjs';
|
|
2
|
+
import './options-yXyCFCtr.mjs';
|
|
3
3
|
import 'lru-cache';
|
|
4
4
|
import 'md5';
|
|
5
5
|
import './defaults-5A8JI2hW.mjs';
|
package/dist/webpack4.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-Bv-1GQJY.js');
|
|
6
6
|
var fs = require('node:fs');
|
|
7
7
|
var path = require('node:path');
|
|
8
8
|
var webpackSources = require('webpack-sources');
|
package/dist/webpack4.mjs
CHANGED
package/package.json
CHANGED