@unocss/config 66.6.4-beta.1 → 66.6.6-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/index.mjs +4 -4
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7,9 +7,10 @@ import { createConfigLoader } from "unconfig";
|
|
|
7
7
|
|
|
8
8
|
//#region src/index.ts
|
|
9
9
|
async function loadConfig(cwd = process.cwd(), configOrPath = cwd, extraConfigSources = [], defaults = {}) {
|
|
10
|
-
var _result$sources;
|
|
11
10
|
let inlineConfig = {};
|
|
11
|
+
let hasUserCustomConfig = false;
|
|
12
12
|
if (typeof configOrPath !== "string") {
|
|
13
|
+
hasUserCustomConfig = true;
|
|
13
14
|
inlineConfig = configOrPath;
|
|
14
15
|
if (inlineConfig.configFile === false) return {
|
|
15
16
|
config: inlineConfig,
|
|
@@ -28,10 +29,9 @@ async function loadConfig(cwd = process.cwd(), configOrPath = cwd, extraConfigSo
|
|
|
28
29
|
files: resolved,
|
|
29
30
|
extensions: []
|
|
30
31
|
}] : [{ files: ["unocss.config", "uno.config"] }, ...extraConfigSources],
|
|
31
|
-
cwd
|
|
32
|
-
defaults: inlineConfig
|
|
32
|
+
cwd
|
|
33
33
|
}).load();
|
|
34
|
-
if (!
|
|
34
|
+
if (!hasUserCustomConfig && !isFile && !result.config) consola.error(`[@unocss/config] Config file not found in ${cyan(configOrPath)} - loading default config.`);
|
|
35
35
|
result.config = Object.assign(defaults, inlineConfig, result.config ?? {});
|
|
36
36
|
if (result.config.configDeps) result.sources = [...result.sources, ...result.config.configDeps.map((i) => resolve(cwd, i))];
|
|
37
37
|
return result;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.6.
|
|
4
|
+
"version": "66.6.6-beta.1",
|
|
5
5
|
"description": "Config loader for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"colorette": "^2.0.20",
|
|
33
33
|
"consola": "^3.4.2",
|
|
34
34
|
"unconfig": "^7.5.0",
|
|
35
|
-
"@unocss/core": "66.6.
|
|
35
|
+
"@unocss/core": "66.6.6-beta.1"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsdown",
|