weapp-tailwindcss 4.3.2 → 4.4.0-alpha.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/chunk-2F7HOQQY.mjs +8 -0
- package/dist/chunk-2NRTWL47.js +43 -0
- package/dist/{chunk-YNMM5ZP5.mjs → chunk-3MSGCIVH.mjs} +128 -138
- package/dist/chunk-6GP37C26.js +8 -0
- package/dist/{chunk-GRWK73SM.js → chunk-AEJDBNAX.js} +567 -309
- package/dist/{chunk-IDYXPWF6.mjs → chunk-AXYGCCZW.mjs} +51 -63
- package/dist/chunk-E2LRXNZ3.js +122 -0
- package/dist/{chunk-BXPTS6UP.mjs → chunk-FBGUUXQV.mjs} +1 -1
- package/dist/{chunk-72PXDJ7I.js → chunk-FOSGDQZ7.js} +34 -43
- package/dist/chunk-H4JTYYOI.mjs +43 -0
- package/dist/{chunk-3YIQPUK7.mjs → chunk-IHKVNALD.mjs} +29 -38
- package/dist/chunk-KAKRCCPX.mjs +122 -0
- package/dist/{chunk-AMSF25MI.js → chunk-NZ7VALIM.js} +130 -140
- package/dist/{chunk-YSVQIZ4W.js → chunk-PPTSD6TQ.js} +51 -63
- package/dist/{chunk-K6IPKJSY.js → chunk-RBRSMHFS.js} +1 -1
- package/dist/chunk-UW3WHSZ5.js +39 -0
- package/dist/{chunk-DGVVFKNF.mjs → chunk-WCIVXE2D.mjs} +566 -308
- package/dist/chunk-ZNKIYZRQ.mjs +39 -0
- package/dist/cli.js +5 -8
- package/dist/cli.mjs +4 -7
- package/dist/core.js +5 -5
- package/dist/core.mjs +4 -4
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +3 -3
- package/dist/css-macro.mjs +2 -2
- package/dist/defaults.js +4 -4
- package/dist/defaults.mjs +3 -3
- package/dist/escape.js +1 -1
- package/dist/escape.mjs +1 -1
- package/dist/gulp.js +7 -7
- package/dist/gulp.mjs +6 -6
- package/dist/index.js +10 -9
- package/dist/index.mjs +9 -8
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss-html-transform.mjs +1 -1
- package/dist/presets.js +3 -3
- package/dist/presets.mjs +2 -2
- package/dist/types.d.mts +248 -194
- package/dist/types.d.ts +248 -194
- package/dist/types.js +1 -1
- package/dist/types.mjs +1 -1
- package/dist/vite.js +7 -7
- package/dist/vite.mjs +6 -6
- package/dist/webpack.js +8 -7
- package/dist/webpack.mjs +7 -6
- package/dist/webpack4.js +53 -68
- package/dist/webpack4.mjs +52 -67
- package/package.json +10 -12
- package/dist/chunk-3AUX4FGE.mjs +0 -13
- package/dist/chunk-JXBLHLFR.mjs +0 -27
- package/dist/chunk-K3KFCISK.js +0 -145
- package/dist/chunk-LSSLYD6B.js +0 -13
- package/dist/chunk-O335YLYH.js +0 -27
- package/dist/chunk-RC2KZ2LO.mjs +0 -145
package/dist/chunk-K3KFCISK.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
-
|
|
3
|
-
var _chunkLSSLYD6Bjs = require('./chunk-LSSLYD6B.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkGRWK73SMjs = require('./chunk-GRWK73SM.js');
|
|
7
|
-
|
|
8
|
-
// src/bundlers/gulp/index.ts
|
|
9
|
-
var _buffer = require('buffer');
|
|
10
|
-
var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
|
|
11
|
-
var debug = _chunkLSSLYD6Bjs.createDebug.call(void 0, );
|
|
12
|
-
var Transform = _stream2.default.Transform;
|
|
13
|
-
function createPlugins(options = {}) {
|
|
14
|
-
const opts = _chunkGRWK73SMjs.getCompilerContext.call(void 0, options);
|
|
15
|
-
const { templateHandler, styleHandler, jsHandler, setMangleRuntimeSet, cache, twPatcher } = opts;
|
|
16
|
-
let runtimeSet = /* @__PURE__ */ new Set();
|
|
17
|
-
twPatcher.patch();
|
|
18
|
-
function transformWxss(options2 = {}) {
|
|
19
|
-
return new Transform({
|
|
20
|
-
objectMode: true,
|
|
21
|
-
async transform(file, _encoding, callback) {
|
|
22
|
-
runtimeSet = await twPatcher.getClassSet();
|
|
23
|
-
setMangleRuntimeSet(runtimeSet);
|
|
24
|
-
const error = null;
|
|
25
|
-
if (file.contents) {
|
|
26
|
-
const rawSource = file.contents.toString();
|
|
27
|
-
const hash = cache.computeHash(rawSource);
|
|
28
|
-
cache.calcHashValueChanged(file.path, hash);
|
|
29
|
-
await cache.process(
|
|
30
|
-
file.path,
|
|
31
|
-
() => {
|
|
32
|
-
const source = cache.get(file.path);
|
|
33
|
-
if (source) {
|
|
34
|
-
file.contents = _buffer.Buffer.from(source);
|
|
35
|
-
debug("css cache hit: %s", file.path);
|
|
36
|
-
} else {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
async () => {
|
|
41
|
-
const { css } = await styleHandler(rawSource, {
|
|
42
|
-
isMainChunk: true,
|
|
43
|
-
majorVersion: twPatcher.majorVersion,
|
|
44
|
-
...options2
|
|
45
|
-
});
|
|
46
|
-
file.contents = _buffer.Buffer.from(css);
|
|
47
|
-
debug("css handle: %s", file.path);
|
|
48
|
-
return {
|
|
49
|
-
key: file.path,
|
|
50
|
-
source: css
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
callback(error, file);
|
|
56
|
-
}
|
|
57
|
-
// construct(callback) {
|
|
58
|
-
// debug('transformWxss start')
|
|
59
|
-
// callback()
|
|
60
|
-
// }
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function transformJs(options2 = {}) {
|
|
64
|
-
return new Transform({
|
|
65
|
-
objectMode: true,
|
|
66
|
-
async transform(file, _encoding, callback) {
|
|
67
|
-
const error = null;
|
|
68
|
-
if (file.contents) {
|
|
69
|
-
const rawSource = file.contents.toString();
|
|
70
|
-
const hash = cache.computeHash(rawSource);
|
|
71
|
-
cache.calcHashValueChanged(file.path, hash);
|
|
72
|
-
await cache.process(
|
|
73
|
-
file.path,
|
|
74
|
-
() => {
|
|
75
|
-
const source = cache.get(file.path);
|
|
76
|
-
if (source) {
|
|
77
|
-
file.contents = _buffer.Buffer.from(source);
|
|
78
|
-
debug("js cache hit: %s", file.path);
|
|
79
|
-
} else {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
async () => {
|
|
84
|
-
const { code } = await jsHandler(rawSource, runtimeSet, options2);
|
|
85
|
-
file.contents = _buffer.Buffer.from(code);
|
|
86
|
-
debug("js handle: %s", file.path);
|
|
87
|
-
return {
|
|
88
|
-
key: file.path,
|
|
89
|
-
source: code
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
callback(error, file);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function transformWxml(options2 = {}) {
|
|
99
|
-
return new Transform({
|
|
100
|
-
objectMode: true,
|
|
101
|
-
async transform(file, _encoding, callback) {
|
|
102
|
-
const error = null;
|
|
103
|
-
if (file.contents) {
|
|
104
|
-
const rawSource = file.contents.toString();
|
|
105
|
-
const hash = cache.computeHash(rawSource);
|
|
106
|
-
cache.calcHashValueChanged(file.path, hash);
|
|
107
|
-
await cache.process(
|
|
108
|
-
file.path,
|
|
109
|
-
() => {
|
|
110
|
-
const source = cache.get(file.path);
|
|
111
|
-
if (source) {
|
|
112
|
-
file.contents = _buffer.Buffer.from(source);
|
|
113
|
-
debug("html cache hit: %s", file.path);
|
|
114
|
-
} else {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
async () => {
|
|
119
|
-
const code = await templateHandler(rawSource, {
|
|
120
|
-
runtimeSet,
|
|
121
|
-
...options2
|
|
122
|
-
});
|
|
123
|
-
file.contents = _buffer.Buffer.from(code);
|
|
124
|
-
debug("html handle: %s", file.path);
|
|
125
|
-
return {
|
|
126
|
-
key: file.path,
|
|
127
|
-
source: code
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
callback(error, file);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
transformWxss,
|
|
138
|
-
transformWxml,
|
|
139
|
-
transformJs
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
exports.createPlugins = createPlugins;
|
package/dist/chunk-LSSLYD6B.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/debug/index.ts
|
|
2
|
-
var _debug2 = require('debug'); var _debug3 = _interopRequireDefault(_debug2);
|
|
3
|
-
var _debug = _debug3.default.call(void 0, "weapp-tw");
|
|
4
|
-
function createDebug(prefix) {
|
|
5
|
-
function debug(formatter, ...args) {
|
|
6
|
-
return _debug((_nullishCoalesce(prefix, () => ( ""))) + formatter, ...args);
|
|
7
|
-
}
|
|
8
|
-
return debug;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.createDebug = createDebug;
|
package/dist/chunk-O335YLYH.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/utils/index.ts
|
|
2
|
-
var _shared = require('@weapp-tailwindcss/shared');
|
|
3
|
-
function getGroupedEntries(entries, options) {
|
|
4
|
-
const { cssMatcher, htmlMatcher, jsMatcher, wxsMatcher } = options;
|
|
5
|
-
const groupedEntries = _shared.groupBy.call(void 0, entries, ([file]) => {
|
|
6
|
-
if (cssMatcher(file)) {
|
|
7
|
-
return "css";
|
|
8
|
-
} else if (htmlMatcher(file)) {
|
|
9
|
-
return "html";
|
|
10
|
-
} else if (jsMatcher(file) || wxsMatcher(file)) {
|
|
11
|
-
return "js";
|
|
12
|
-
} else {
|
|
13
|
-
return "other";
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return groupedEntries;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
exports.defu = _shared.defu; exports.defuOverrideArray = _shared.defuOverrideArray; exports.isMap = _shared.isMap; exports.noop = _shared.noop; exports.regExpTest = _shared.regExpTest; exports.removeExt = _shared.removeExt; exports.getGroupedEntries = getGroupedEntries;
|
package/dist/chunk-RC2KZ2LO.mjs
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createDebug
|
|
3
|
-
} from "./chunk-3AUX4FGE.mjs";
|
|
4
|
-
import {
|
|
5
|
-
getCompilerContext
|
|
6
|
-
} from "./chunk-DGVVFKNF.mjs";
|
|
7
|
-
|
|
8
|
-
// src/bundlers/gulp/index.ts
|
|
9
|
-
import { Buffer } from "buffer";
|
|
10
|
-
import stream from "stream";
|
|
11
|
-
var debug = createDebug();
|
|
12
|
-
var Transform = stream.Transform;
|
|
13
|
-
function createPlugins(options = {}) {
|
|
14
|
-
const opts = getCompilerContext(options);
|
|
15
|
-
const { templateHandler, styleHandler, jsHandler, setMangleRuntimeSet, cache, twPatcher } = opts;
|
|
16
|
-
let runtimeSet = /* @__PURE__ */ new Set();
|
|
17
|
-
twPatcher.patch();
|
|
18
|
-
function transformWxss(options2 = {}) {
|
|
19
|
-
return new Transform({
|
|
20
|
-
objectMode: true,
|
|
21
|
-
async transform(file, _encoding, callback) {
|
|
22
|
-
runtimeSet = await twPatcher.getClassSet();
|
|
23
|
-
setMangleRuntimeSet(runtimeSet);
|
|
24
|
-
const error = null;
|
|
25
|
-
if (file.contents) {
|
|
26
|
-
const rawSource = file.contents.toString();
|
|
27
|
-
const hash = cache.computeHash(rawSource);
|
|
28
|
-
cache.calcHashValueChanged(file.path, hash);
|
|
29
|
-
await cache.process(
|
|
30
|
-
file.path,
|
|
31
|
-
() => {
|
|
32
|
-
const source = cache.get(file.path);
|
|
33
|
-
if (source) {
|
|
34
|
-
file.contents = Buffer.from(source);
|
|
35
|
-
debug("css cache hit: %s", file.path);
|
|
36
|
-
} else {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
async () => {
|
|
41
|
-
const { css } = await styleHandler(rawSource, {
|
|
42
|
-
isMainChunk: true,
|
|
43
|
-
majorVersion: twPatcher.majorVersion,
|
|
44
|
-
...options2
|
|
45
|
-
});
|
|
46
|
-
file.contents = Buffer.from(css);
|
|
47
|
-
debug("css handle: %s", file.path);
|
|
48
|
-
return {
|
|
49
|
-
key: file.path,
|
|
50
|
-
source: css
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
callback(error, file);
|
|
56
|
-
}
|
|
57
|
-
// construct(callback) {
|
|
58
|
-
// debug('transformWxss start')
|
|
59
|
-
// callback()
|
|
60
|
-
// }
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function transformJs(options2 = {}) {
|
|
64
|
-
return new Transform({
|
|
65
|
-
objectMode: true,
|
|
66
|
-
async transform(file, _encoding, callback) {
|
|
67
|
-
const error = null;
|
|
68
|
-
if (file.contents) {
|
|
69
|
-
const rawSource = file.contents.toString();
|
|
70
|
-
const hash = cache.computeHash(rawSource);
|
|
71
|
-
cache.calcHashValueChanged(file.path, hash);
|
|
72
|
-
await cache.process(
|
|
73
|
-
file.path,
|
|
74
|
-
() => {
|
|
75
|
-
const source = cache.get(file.path);
|
|
76
|
-
if (source) {
|
|
77
|
-
file.contents = Buffer.from(source);
|
|
78
|
-
debug("js cache hit: %s", file.path);
|
|
79
|
-
} else {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
async () => {
|
|
84
|
-
const { code } = await jsHandler(rawSource, runtimeSet, options2);
|
|
85
|
-
file.contents = Buffer.from(code);
|
|
86
|
-
debug("js handle: %s", file.path);
|
|
87
|
-
return {
|
|
88
|
-
key: file.path,
|
|
89
|
-
source: code
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
callback(error, file);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function transformWxml(options2 = {}) {
|
|
99
|
-
return new Transform({
|
|
100
|
-
objectMode: true,
|
|
101
|
-
async transform(file, _encoding, callback) {
|
|
102
|
-
const error = null;
|
|
103
|
-
if (file.contents) {
|
|
104
|
-
const rawSource = file.contents.toString();
|
|
105
|
-
const hash = cache.computeHash(rawSource);
|
|
106
|
-
cache.calcHashValueChanged(file.path, hash);
|
|
107
|
-
await cache.process(
|
|
108
|
-
file.path,
|
|
109
|
-
() => {
|
|
110
|
-
const source = cache.get(file.path);
|
|
111
|
-
if (source) {
|
|
112
|
-
file.contents = Buffer.from(source);
|
|
113
|
-
debug("html cache hit: %s", file.path);
|
|
114
|
-
} else {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
async () => {
|
|
119
|
-
const code = await templateHandler(rawSource, {
|
|
120
|
-
runtimeSet,
|
|
121
|
-
...options2
|
|
122
|
-
});
|
|
123
|
-
file.contents = Buffer.from(code);
|
|
124
|
-
debug("html handle: %s", file.path);
|
|
125
|
-
return {
|
|
126
|
-
key: file.path,
|
|
127
|
-
source: code
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
callback(error, file);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
transformWxss,
|
|
138
|
-
transformWxml,
|
|
139
|
-
transformJs
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export {
|
|
144
|
-
createPlugins
|
|
145
|
-
};
|