@unocss/postcss 0.61.8 → 0.62.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/esm.mjs +8 -8
- package/package.json +6 -6
package/dist/esm.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stat, readFile } from 'node:fs/promises';
|
|
2
2
|
import { normalize } from 'node:path';
|
|
3
3
|
import process from 'node:process';
|
|
4
|
-
import
|
|
4
|
+
import { glob } from 'tinyglobby';
|
|
5
5
|
import postcss from 'postcss';
|
|
6
6
|
import { expandVariantGroup, notNull, regexScopePlaceholder, createGenerator } from '@unocss/core';
|
|
7
7
|
import { createRecoveryConfigLoader } from '@unocss/config';
|
|
@@ -200,11 +200,11 @@ function createPlugin(options) {
|
|
|
200
200
|
}
|
|
201
201
|
const globs = uno.config.content?.filesystem ?? defaultFilesystemGlobs;
|
|
202
202
|
const plainContent = uno.config.content?.inline ?? [];
|
|
203
|
-
const entries = await
|
|
203
|
+
const entries = await glob(isScanTarget ? globs : [from], {
|
|
204
204
|
cwd,
|
|
205
205
|
absolute: true,
|
|
206
206
|
ignore: ["**/node_modules/**"],
|
|
207
|
-
|
|
207
|
+
expandDirectories: false
|
|
208
208
|
});
|
|
209
209
|
await parseApply(root, uno, directiveMap.apply);
|
|
210
210
|
await parseTheme(root, uno);
|
|
@@ -225,17 +225,17 @@ function createPlugin(options) {
|
|
|
225
225
|
const BATCH_SIZE = 500;
|
|
226
226
|
for (let i = 0; i < entries.length; i += BATCH_SIZE) {
|
|
227
227
|
const batch = entries.slice(i, i + BATCH_SIZE);
|
|
228
|
-
promises.push(...batch.map(async (
|
|
228
|
+
promises.push(...batch.map(async (file) => {
|
|
229
|
+
const { mtimeMs } = await stat(file);
|
|
230
|
+
if (fileMap.has(file) && mtimeMs <= fileMap.get(file))
|
|
231
|
+
return;
|
|
232
|
+
fileMap.set(file, mtimeMs);
|
|
229
233
|
result.messages.push({
|
|
230
234
|
type: "dependency",
|
|
231
235
|
plugin: directiveMap.unocss,
|
|
232
236
|
file: normalize(file),
|
|
233
237
|
parent: from
|
|
234
238
|
});
|
|
235
|
-
if (fileMap.has(file) && mtimeMs <= fileMap.get(file))
|
|
236
|
-
return;
|
|
237
|
-
else
|
|
238
|
-
fileMap.set(file, mtimeMs);
|
|
239
239
|
const content = await readFile(file, "utf8");
|
|
240
240
|
const { matched } = await uno.generate(content, {
|
|
241
241
|
id: file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/postcss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.62.0",
|
|
5
5
|
"description": "PostCSS plugin for UnoCSS",
|
|
6
6
|
"author": "sibbng <sibbngheid@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"css-tree": "^2.3.1",
|
|
58
|
-
"fast-glob": "^3.3.2",
|
|
59
58
|
"magic-string": "^0.30.11",
|
|
60
|
-
"postcss": "^8.4.
|
|
61
|
-
"
|
|
62
|
-
"@unocss/
|
|
63
|
-
"@unocss/
|
|
59
|
+
"postcss": "^8.4.41",
|
|
60
|
+
"tinyglobby": "^0.2.1",
|
|
61
|
+
"@unocss/core": "0.62.0",
|
|
62
|
+
"@unocss/rule-utils": "0.62.0",
|
|
63
|
+
"@unocss/config": "0.62.0"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "unbuild",
|