@unocss/cli 66.5.9 → 66.5.10-beta.1
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.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import process from 'node:process';
|
|
|
2
2
|
import { loadConfig } from '@unocss/config';
|
|
3
3
|
import { toArray } from '@unocss/core';
|
|
4
4
|
import { cac } from 'cac';
|
|
5
|
-
import { b as build, v as version, h as handleError } from './shared/cli.
|
|
5
|
+
import { b as build, v as version, h as handleError } from './shared/cli.CXJ6_JxU.mjs';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'unplugin-utils';
|
|
8
8
|
import '@jridgewell/remapping';
|
package/dist/index.mjs
CHANGED
|
@@ -105,6 +105,22 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
105
105
|
if (tasks[0] === _tasks[0])
|
|
106
106
|
tasks.splice(0, _tasks.length);
|
|
107
107
|
}
|
|
108
|
+
const vmpCache = /* @__PURE__ */ new Map();
|
|
109
|
+
async function getVMPRegexes() {
|
|
110
|
+
const config = await getConfig();
|
|
111
|
+
const prefix = config.virtualModulePrefix || "__uno";
|
|
112
|
+
if (vmpCache.has(prefix))
|
|
113
|
+
return vmpCache.get(prefix);
|
|
114
|
+
const RESOLVED_ID_WITH_QUERY_RE = new RegExp(`[/\\\\]${prefix}(_.*?)?\\.css(\\?.*)?$`);
|
|
115
|
+
const RESOLVED_ID_RE = new RegExp(`[/\\\\]${prefix}(?:_(.*?))?.css$`);
|
|
116
|
+
const regexes = {
|
|
117
|
+
prefix,
|
|
118
|
+
RESOLVED_ID_WITH_QUERY_RE,
|
|
119
|
+
RESOLVED_ID_RE
|
|
120
|
+
};
|
|
121
|
+
vmpCache.set(prefix, regexes);
|
|
122
|
+
return regexes;
|
|
123
|
+
}
|
|
108
124
|
return {
|
|
109
125
|
get ready() {
|
|
110
126
|
return ready;
|
|
@@ -134,7 +150,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
134
150
|
return root;
|
|
135
151
|
},
|
|
136
152
|
updateRoot,
|
|
137
|
-
getConfigFileList: () => configFileList
|
|
153
|
+
getConfigFileList: () => configFileList,
|
|
154
|
+
getVMPRegexes
|
|
138
155
|
};
|
|
139
156
|
}
|
|
140
157
|
|
|
@@ -200,7 +217,7 @@ async function applyTransformers(ctx, original, id, enforce = "default") {
|
|
|
200
217
|
}
|
|
201
218
|
}
|
|
202
219
|
|
|
203
|
-
const version = "66.5.
|
|
220
|
+
const version = "66.5.10-beta.1";
|
|
204
221
|
|
|
205
222
|
const defaultConfig = {
|
|
206
223
|
envMode: "build",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.5.
|
|
4
|
+
"version": "66.5.10-beta.1",
|
|
5
5
|
"description": "CLI for UnoCSS",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Johann Schopplich",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"perfect-debounce": "^1.0.0",
|
|
51
51
|
"tinyglobby": "^0.2.15",
|
|
52
52
|
"unplugin-utils": "^0.3.1",
|
|
53
|
-
"@unocss/
|
|
54
|
-
"@unocss/
|
|
55
|
-
"@unocss/
|
|
53
|
+
"@unocss/core": "66.5.10-beta.1",
|
|
54
|
+
"@unocss/preset-uno": "66.5.10-beta.1",
|
|
55
|
+
"@unocss/config": "66.5.10-beta.1"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "unbuild",
|