@unocss/cli 0.35.4 → 0.37.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/chunks/index.mjs +15 -16
- package/package.json +4 -4
package/dist/chunks/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { createGenerator, toArray } from '@unocss/core';
|
|
|
8
8
|
import { loadConfig } from '@unocss/config';
|
|
9
9
|
import presetUno from '@unocss/preset-uno';
|
|
10
10
|
|
|
11
|
-
const version = "0.
|
|
11
|
+
const version = "0.37.1";
|
|
12
12
|
|
|
13
13
|
class PrettyError extends Error {
|
|
14
14
|
constructor(message) {
|
|
@@ -79,22 +79,21 @@ async function build(_options) {
|
|
|
79
79
|
ignorePermissionErrors: true,
|
|
80
80
|
ignored
|
|
81
81
|
});
|
|
82
|
-
if (configSources.length)
|
|
82
|
+
if (configSources.length)
|
|
83
83
|
watcher.add(configSources);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
84
|
+
watcher.on("all", async (type, file) => {
|
|
85
|
+
if (configSources.includes(file)) {
|
|
86
|
+
uno.setConfig((await loadConfig()).config);
|
|
87
|
+
consola.info(`${cyan(basename(file))} changed, setting new config`);
|
|
88
|
+
} else {
|
|
89
|
+
consola.log(`${green(type)} ${dim(file)}`);
|
|
90
|
+
if (type.startsWith("unlink"))
|
|
91
|
+
fileCache.delete(file);
|
|
92
|
+
else
|
|
93
|
+
fileCache.set(file, await promises.readFile(file, "utf8"));
|
|
94
|
+
}
|
|
95
|
+
debouncedBuild();
|
|
96
|
+
});
|
|
98
97
|
};
|
|
99
98
|
await generate(options);
|
|
100
99
|
startWatcher();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.1",
|
|
4
4
|
"description": "CLI for UnoCSS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Johann Schopplich",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"node": ">=14"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@unocss/config": "0.
|
|
43
|
-
"@unocss/core": "0.
|
|
44
|
-
"@unocss/preset-uno": "0.
|
|
42
|
+
"@unocss/config": "0.37.1",
|
|
43
|
+
"@unocss/core": "0.37.1",
|
|
44
|
+
"@unocss/preset-uno": "0.37.1",
|
|
45
45
|
"cac": "^6.7.12",
|
|
46
46
|
"chokidar": "^3.5.3",
|
|
47
47
|
"colorette": "^2.0.16",
|