@unocss/cli 0.54.0 → 0.54.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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
1
2
|
import { cac } from 'cac';
|
|
2
3
|
import { loadConfig } from '@unocss/config';
|
|
3
4
|
import { toArray } from '@unocss/core';
|
|
4
|
-
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.03d43fb7.mjs';
|
|
5
6
|
import 'node:fs';
|
|
6
7
|
import 'pathe';
|
|
7
8
|
import 'fast-glob';
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
|
+
import 'node:process';
|
|
2
3
|
import 'pathe';
|
|
3
4
|
import 'fast-glob';
|
|
4
5
|
import 'consola';
|
|
5
6
|
import 'colorette';
|
|
6
7
|
import 'perfect-debounce';
|
|
7
8
|
import '@unocss/core';
|
|
8
|
-
export { b as build, r as resolveOptions } from './shared/cli.
|
|
9
|
+
export { b as build, r as resolveOptions } from './shared/cli.03d43fb7.mjs';
|
|
9
10
|
import '@rollup/pluginutils';
|
|
10
11
|
import '@unocss/config';
|
|
11
12
|
import 'magic-string';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { promises, existsSync } from 'node:fs';
|
|
2
|
+
import process$1 from 'node:process';
|
|
2
3
|
import { resolve, dirname, relative, normalize, basename } from 'pathe';
|
|
3
4
|
import fg from 'fast-glob';
|
|
4
5
|
import { consola } from 'consola';
|
|
@@ -42,7 +43,7 @@ function deprecationCheck(config) {
|
|
|
42
43
|
|
|
43
44
|
function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
|
|
44
45
|
}) {
|
|
45
|
-
let root = process.cwd();
|
|
46
|
+
let root = process$1.cwd();
|
|
46
47
|
let rawConfig = {};
|
|
47
48
|
let configFileList = [];
|
|
48
49
|
const uno = createGenerator(rawConfig, defaults);
|
|
@@ -203,7 +204,7 @@ function restoreSkipCode(code, map) {
|
|
|
203
204
|
return code;
|
|
204
205
|
}
|
|
205
206
|
|
|
206
|
-
const version = "0.54.
|
|
207
|
+
const version = "0.54.1";
|
|
207
208
|
|
|
208
209
|
const defaultConfig = {
|
|
209
210
|
envMode: "build",
|
|
@@ -225,7 +226,7 @@ class PrettyError extends Error {
|
|
|
225
226
|
function handleError(error) {
|
|
226
227
|
if (error instanceof PrettyError)
|
|
227
228
|
consola.error(error.message);
|
|
228
|
-
process.exitCode = 1;
|
|
229
|
+
process$1.exitCode = 1;
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
let watcher;
|
|
@@ -238,7 +239,7 @@ async function getWatcher(options) {
|
|
|
238
239
|
ignoreInitial: true,
|
|
239
240
|
ignorePermissionErrors: true,
|
|
240
241
|
ignored,
|
|
241
|
-
cwd: options?.cwd || process.cwd()
|
|
242
|
+
cwd: options?.cwd || process$1.cwd()
|
|
242
243
|
});
|
|
243
244
|
watcher = newWatcher;
|
|
244
245
|
return newWatcher;
|
|
@@ -255,7 +256,7 @@ async function resolveOptions(options) {
|
|
|
255
256
|
}
|
|
256
257
|
async function build(_options) {
|
|
257
258
|
const fileCache = /* @__PURE__ */ new Map();
|
|
258
|
-
const cwd = _options.cwd || process.cwd();
|
|
259
|
+
const cwd = _options.cwd || process$1.cwd();
|
|
259
260
|
const options = await resolveOptions(_options);
|
|
260
261
|
async function loadConfig() {
|
|
261
262
|
const ctx2 = createContext(options.config, defaultConfig);
|
|
@@ -334,10 +335,10 @@ async function build(_options) {
|
|
|
334
335
|
}
|
|
335
336
|
);
|
|
336
337
|
if (options2.stdout) {
|
|
337
|
-
process.stdout.write(css);
|
|
338
|
+
process$1.stdout.write(css);
|
|
338
339
|
return;
|
|
339
340
|
}
|
|
340
|
-
const outFile = resolve(options2.cwd || process.cwd(), options2.outFile ?? "uno.css");
|
|
341
|
+
const outFile = resolve(options2.cwd || process$1.cwd(), options2.outFile ?? "uno.css");
|
|
341
342
|
const dir = dirname(outFile);
|
|
342
343
|
if (!existsSync(dir))
|
|
343
344
|
await promises.mkdir(dir, { recursive: true });
|
|
@@ -345,7 +346,7 @@ async function build(_options) {
|
|
|
345
346
|
if (!options2.watch) {
|
|
346
347
|
consola.success(
|
|
347
348
|
`${[...matched].length} utilities generated to ${cyan(
|
|
348
|
-
relative(process.cwd(), outFile)
|
|
349
|
+
relative(process$1.cwd(), outFile)
|
|
349
350
|
)}
|
|
350
351
|
`
|
|
351
352
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/cli",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.1",
|
|
4
4
|
"description": "CLI for UnoCSS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Johann Schopplich",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"chokidar": "^3.5.3",
|
|
46
46
|
"colorette": "^2.0.20",
|
|
47
47
|
"consola": "^3.2.3",
|
|
48
|
-
"fast-glob": "^3.3.
|
|
49
|
-
"magic-string": "^0.30.
|
|
48
|
+
"fast-glob": "^3.3.1",
|
|
49
|
+
"magic-string": "^0.30.2",
|
|
50
50
|
"pathe": "^1.1.1",
|
|
51
51
|
"perfect-debounce": "^1.0.0",
|
|
52
|
-
"@unocss/config": "0.54.
|
|
53
|
-
"@unocss/core": "0.54.
|
|
54
|
-
"@unocss/preset-uno": "0.54.
|
|
52
|
+
"@unocss/config": "0.54.1",
|
|
53
|
+
"@unocss/core": "0.54.1",
|
|
54
|
+
"@unocss/preset-uno": "0.54.1"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "unbuild",
|