@unocss/cli 0.50.4 → 0.50.6
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,7 @@
|
|
|
1
1
|
import { cac } from 'cac';
|
|
2
2
|
import { loadConfig } from '@unocss/config';
|
|
3
3
|
import { toArray } from '@unocss/core';
|
|
4
|
-
import { b as build, v as version, h as handleError } from './shared/cli.
|
|
4
|
+
import { b as build, v as version, h as handleError } from './shared/cli.b1980e41.mjs';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import 'fast-glob';
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import 'consola';
|
|
|
5
5
|
import 'colorette';
|
|
6
6
|
import 'perfect-debounce';
|
|
7
7
|
import '@unocss/core';
|
|
8
|
-
export { b as build, r as resolveOptions } from './shared/cli.
|
|
8
|
+
export { b as build, r as resolveOptions } from './shared/cli.b1980e41.mjs';
|
|
9
9
|
import '@rollup/pluginutils';
|
|
10
10
|
import '@unocss/config';
|
|
11
11
|
import 'magic-string';
|
|
@@ -11,7 +11,7 @@ import MagicString from 'magic-string';
|
|
|
11
11
|
import remapping from '@ampproject/remapping';
|
|
12
12
|
import presetUno from '@unocss/preset-uno';
|
|
13
13
|
|
|
14
|
-
const version = "0.50.
|
|
14
|
+
const version = "0.50.6";
|
|
15
15
|
|
|
16
16
|
const INCLUDE_COMMENT = "@unocss-include";
|
|
17
17
|
const IGNORE_COMMENT = "@unocss-ignore";
|
|
@@ -177,6 +177,22 @@ const defaultConfig = {
|
|
|
177
177
|
]
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
+
let watcher;
|
|
181
|
+
const getWatcher = async (options) => {
|
|
182
|
+
if (watcher && !options)
|
|
183
|
+
return watcher;
|
|
184
|
+
const { watch } = await import('chokidar');
|
|
185
|
+
const ignored = ["**/{.git,node_modules}/**"];
|
|
186
|
+
const newWatcher = watch(options?.patterns, {
|
|
187
|
+
ignoreInitial: true,
|
|
188
|
+
ignorePermissionErrors: true,
|
|
189
|
+
ignored,
|
|
190
|
+
cwd: options?.cwd || process.cwd()
|
|
191
|
+
});
|
|
192
|
+
watcher = newWatcher;
|
|
193
|
+
return newWatcher;
|
|
194
|
+
};
|
|
195
|
+
|
|
180
196
|
const name = "unocss";
|
|
181
197
|
async function resolveOptions(options) {
|
|
182
198
|
if (!options.patterns?.length) {
|
|
@@ -213,15 +229,8 @@ async function build(_options) {
|
|
|
213
229
|
const startWatcher = async () => {
|
|
214
230
|
if (!options.watch)
|
|
215
231
|
return;
|
|
216
|
-
const { watch } = await import('chokidar');
|
|
217
232
|
const { patterns } = options;
|
|
218
|
-
const
|
|
219
|
-
const watcher = watch(patterns, {
|
|
220
|
-
ignoreInitial: true,
|
|
221
|
-
ignorePermissionErrors: true,
|
|
222
|
-
ignored,
|
|
223
|
-
cwd
|
|
224
|
-
});
|
|
233
|
+
const watcher = await getWatcher(options);
|
|
225
234
|
if (configSources.length)
|
|
226
235
|
watcher.add(configSources);
|
|
227
236
|
watcher.on("all", async (type, file) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/cli",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.6",
|
|
4
4
|
"description": "CLI for UnoCSS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Johann Schopplich",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"magic-string": "^0.30.0",
|
|
50
50
|
"pathe": "^1.1.0",
|
|
51
51
|
"perfect-debounce": "^0.1.3",
|
|
52
|
-
"@unocss/config": "0.50.
|
|
53
|
-
"@unocss/core": "0.50.
|
|
54
|
-
"@unocss/preset-uno": "0.50.
|
|
52
|
+
"@unocss/config": "0.50.6",
|
|
53
|
+
"@unocss/core": "0.50.6",
|
|
54
|
+
"@unocss/preset-uno": "0.50.6"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "unbuild",
|