@weapp-tailwindcss/cli 5.5.6 → 5.5.8
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/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-DUmPVfu5.cjs → src-BhmZsgqM.cjs} +5 -21
- package/dist/{src-VcA820gK.js → src-_8DTp4rp.js} +5 -21
- package/package.json +3 -3
package/dist/bin.cjs
CHANGED
package/dist/bin.js
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as runCli } from "./src-
|
|
1
|
+
import { t as runCli } from "./src-_8DTp4rp.js";
|
|
2
2
|
export { runCli };
|
|
@@ -30,7 +30,6 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
30
30
|
node_fs_promises = __toESM(node_fs_promises, 1);
|
|
31
31
|
let node_path = require("node:path");
|
|
32
32
|
node_path = __toESM(node_path, 1);
|
|
33
|
-
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
34
33
|
let lightningcss = require("lightningcss");
|
|
35
34
|
let weapp_tailwindcss_generator = require("weapp-tailwindcss/generator");
|
|
36
35
|
let node_fs = require("node:fs");
|
|
@@ -387,25 +386,12 @@ async function buildOnce(options, stdinCss) {
|
|
|
387
386
|
});
|
|
388
387
|
const generator = (0, weapp_tailwindcss_generator.createWeappTailwindcssGenerator)(source);
|
|
389
388
|
try {
|
|
390
|
-
const { compiled, dependencies: compilerDependencies } = await (0, _tailwindcss_mangle_engine.compileTailwindV4Source)(source);
|
|
391
|
-
const scanPatterns = (0, _tailwindcss_mangle_engine.createTailwindV4CompiledSourceEntries)(compiled.root, compiled.sources, source.projectRoot);
|
|
392
|
-
const scanSources = (0, _tailwindcss_mangle_engine.normalizeTailwindV4ScannerSources)(scanPatterns, source.projectRoot);
|
|
393
389
|
const outputPath = options.output && options.output !== "-" ? node_path.default.resolve(options.output) : void 0;
|
|
394
|
-
const sourceFiles = await (0, _tailwindcss_mangle_engine.resolveProjectSourceFiles)({
|
|
395
|
-
cwd: source.projectRoot,
|
|
396
|
-
sources: scanSources,
|
|
397
|
-
filter: (file) => node_path.default.resolve(file) !== outputPath
|
|
398
|
-
});
|
|
399
|
-
const candidateGroups = await Promise.all(sourceFiles.map(async (file) => {
|
|
400
|
-
const content = await node_fs_promises.default.readFile(file, "utf8");
|
|
401
|
-
const extension = node_path.default.extname(file).slice(1) || "html";
|
|
402
|
-
return (0, _tailwindcss_mangle_engine.extractRawCandidatesWithPositions)(content, extension);
|
|
403
|
-
}));
|
|
404
|
-
const candidates = new Set(candidateGroups.flat().map((candidate) => candidate.rawCandidate));
|
|
405
390
|
const result = await generator.generate({
|
|
406
|
-
candidates,
|
|
407
391
|
target: options.target,
|
|
408
|
-
scanSources:
|
|
392
|
+
scanSources: true,
|
|
393
|
+
scanMode: "compiled",
|
|
394
|
+
excludeFiles: outputPath ? [outputPath] : [],
|
|
409
395
|
incrementalCache: false
|
|
410
396
|
});
|
|
411
397
|
let css = result.css;
|
|
@@ -433,9 +419,7 @@ async function buildOnce(options, stdinCss) {
|
|
|
433
419
|
dependencies: /* @__PURE__ */ new Set([
|
|
434
420
|
...options.input && options.input !== "-" ? [options.input] : [],
|
|
435
421
|
...source.dependencies,
|
|
436
|
-
...
|
|
437
|
-
...result.dependencies,
|
|
438
|
-
...sourceFiles
|
|
422
|
+
...result.dependencies
|
|
439
423
|
])
|
|
440
424
|
};
|
|
441
425
|
} finally {
|
|
@@ -475,7 +459,7 @@ async function runTailwindCli(rawArgv) {
|
|
|
475
459
|
}
|
|
476
460
|
//#endregion
|
|
477
461
|
//#region package.json
|
|
478
|
-
var version = "5.5.
|
|
462
|
+
var version = "5.5.8";
|
|
479
463
|
//#endregion
|
|
480
464
|
//#region src/constants.ts
|
|
481
465
|
const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^22.18.0 || >=24.11.0";
|
|
@@ -5,7 +5,6 @@ import semver from "semver";
|
|
|
5
5
|
import { Buffer } from "node:buffer";
|
|
6
6
|
import fs, { access, mkdir, writeFile } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import { compileTailwindV4Source, createTailwindV4CompiledSourceEntries, extractRawCandidatesWithPositions, normalizeTailwindV4ScannerSources, resolveProjectSourceFiles } from "@tailwindcss-mangle/engine";
|
|
9
8
|
import { transform } from "lightningcss";
|
|
10
9
|
import { createWeappTailwindcssGenerator, loadTailwindV4DesignSystem, resolveTailwindV4Source } from "weapp-tailwindcss/generator";
|
|
11
10
|
import fs$1, { constants, existsSync, readFileSync } from "node:fs";
|
|
@@ -358,25 +357,12 @@ async function buildOnce(options, stdinCss) {
|
|
|
358
357
|
});
|
|
359
358
|
const generator = createWeappTailwindcssGenerator(source);
|
|
360
359
|
try {
|
|
361
|
-
const { compiled, dependencies: compilerDependencies } = await compileTailwindV4Source(source);
|
|
362
|
-
const scanPatterns = createTailwindV4CompiledSourceEntries(compiled.root, compiled.sources, source.projectRoot);
|
|
363
|
-
const scanSources = normalizeTailwindV4ScannerSources(scanPatterns, source.projectRoot);
|
|
364
360
|
const outputPath = options.output && options.output !== "-" ? path.resolve(options.output) : void 0;
|
|
365
|
-
const sourceFiles = await resolveProjectSourceFiles({
|
|
366
|
-
cwd: source.projectRoot,
|
|
367
|
-
sources: scanSources,
|
|
368
|
-
filter: (file) => path.resolve(file) !== outputPath
|
|
369
|
-
});
|
|
370
|
-
const candidateGroups = await Promise.all(sourceFiles.map(async (file) => {
|
|
371
|
-
const content = await fs.readFile(file, "utf8");
|
|
372
|
-
const extension = path.extname(file).slice(1) || "html";
|
|
373
|
-
return extractRawCandidatesWithPositions(content, extension);
|
|
374
|
-
}));
|
|
375
|
-
const candidates = new Set(candidateGroups.flat().map((candidate) => candidate.rawCandidate));
|
|
376
361
|
const result = await generator.generate({
|
|
377
|
-
candidates,
|
|
378
362
|
target: options.target,
|
|
379
|
-
scanSources:
|
|
363
|
+
scanSources: true,
|
|
364
|
+
scanMode: "compiled",
|
|
365
|
+
excludeFiles: outputPath ? [outputPath] : [],
|
|
380
366
|
incrementalCache: false
|
|
381
367
|
});
|
|
382
368
|
let css = result.css;
|
|
@@ -404,9 +390,7 @@ async function buildOnce(options, stdinCss) {
|
|
|
404
390
|
dependencies: /* @__PURE__ */ new Set([
|
|
405
391
|
...options.input && options.input !== "-" ? [options.input] : [],
|
|
406
392
|
...source.dependencies,
|
|
407
|
-
...
|
|
408
|
-
...result.dependencies,
|
|
409
|
-
...sourceFiles
|
|
393
|
+
...result.dependencies
|
|
410
394
|
])
|
|
411
395
|
};
|
|
412
396
|
} finally {
|
|
@@ -446,7 +430,7 @@ async function runTailwindCli(rawArgv) {
|
|
|
446
430
|
}
|
|
447
431
|
//#endregion
|
|
448
432
|
//#region package.json
|
|
449
|
-
var version = "5.5.
|
|
433
|
+
var version = "5.5.8";
|
|
450
434
|
//#endregion
|
|
451
435
|
//#region src/constants.ts
|
|
452
436
|
const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^22.18.0 || >=24.11.0";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.5.
|
|
4
|
+
"version": "5.5.8",
|
|
5
5
|
"description": "Cross-platform Tailwind CSS CLI for Web and mini-program builds. 面向 Web 与小程序构建的跨端 Tailwind CSS CLI。",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@parcel/watcher": "^2.6.0",
|
|
53
|
-
"@tailwindcss
|
|
53
|
+
"@weapp-tailwindcss/engine": "0.1.1",
|
|
54
54
|
"@weapp-tailwindcss/logger": "2.0.3",
|
|
55
55
|
"fast-glob": "^3.3.3",
|
|
56
56
|
"lightningcss": "^1.33.0",
|
|
57
57
|
"semver": "~7.8.5",
|
|
58
|
-
"weapp-tailwindcss": "5.5.
|
|
58
|
+
"weapp-tailwindcss": "5.5.8"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsdown",
|