tailwindcss-config 1.1.0 → 1.1.2-alpha.0
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.cjs +3 -76
- package/dist/index.js +4 -74
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@8.5.0_@
|
|
37
|
+
// ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.53.1_@types+node@24.8.1__@swc+core@1.13.5_jiti@2._cec5ee635e8b2932d274eae561437dbd/node_modules/tsup/assets/cjs_shims.js
|
|
38
38
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
39
39
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
40
40
|
|
|
@@ -44,86 +44,13 @@ var import_node_process = __toESM(require("process"), 1);
|
|
|
44
44
|
var import_jiti = require("jiti");
|
|
45
45
|
var import_lilconfig = require("lilconfig");
|
|
46
46
|
|
|
47
|
-
// ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
48
|
-
function isPlainObject(value) {
|
|
49
|
-
if (value === null || typeof value !== "object") {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
const prototype = Object.getPrototypeOf(value);
|
|
53
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
if (Symbol.iterator in value) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
if (Symbol.toStringTag in value) {
|
|
60
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
61
|
-
}
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
65
|
-
if (!isPlainObject(defaults)) {
|
|
66
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
67
|
-
}
|
|
68
|
-
const object = Object.assign({}, defaults);
|
|
69
|
-
for (const key in baseObject) {
|
|
70
|
-
if (key === "__proto__" || key === "constructor") {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
const value = baseObject[key];
|
|
74
|
-
if (value === null || value === void 0) {
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
81
|
-
object[key] = [...value, ...object[key]];
|
|
82
|
-
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
83
|
-
object[key] = _defu(
|
|
84
|
-
value,
|
|
85
|
-
object[key],
|
|
86
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
87
|
-
merger
|
|
88
|
-
);
|
|
89
|
-
} else {
|
|
90
|
-
object[key] = value;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return object;
|
|
94
|
-
}
|
|
95
|
-
function createDefu(merger) {
|
|
96
|
-
return (...arguments_) => (
|
|
97
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
98
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
var defu = createDefu();
|
|
102
|
-
var defuFn = createDefu((object, key, currentValue) => {
|
|
103
|
-
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
104
|
-
object[key] = currentValue(object[key]);
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
var defuArrayFn = createDefu((object, key, currentValue) => {
|
|
109
|
-
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
110
|
-
object[key] = currentValue(object[key]);
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
47
|
// src/utils.ts
|
|
116
|
-
var
|
|
117
|
-
if (Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
118
|
-
obj[key] = value;
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
48
|
+
var import_shared = require("@weapp-tailwindcss/shared");
|
|
122
49
|
|
|
123
50
|
// src/index.ts
|
|
124
51
|
var jiti = (0, import_jiti.createJiti)(importMetaUrl);
|
|
125
52
|
async function loadConfig(options) {
|
|
126
|
-
const { config, cwd, moduleName } = defuOverrideArray(
|
|
53
|
+
const { config, cwd, moduleName } = (0, import_shared.defuOverrideArray)(
|
|
127
54
|
options,
|
|
128
55
|
{
|
|
129
56
|
cwd: import_node_process.default.cwd(),
|
package/dist/index.js
CHANGED
|
@@ -4,81 +4,11 @@ import process from "process";
|
|
|
4
4
|
import { createJiti } from "jiti";
|
|
5
5
|
import { lilconfig } from "lilconfig";
|
|
6
6
|
|
|
7
|
-
// ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
8
|
-
function isPlainObject(value) {
|
|
9
|
-
if (value === null || typeof value !== "object") {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
const prototype = Object.getPrototypeOf(value);
|
|
13
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
if (Symbol.iterator in value) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (Symbol.toStringTag in value) {
|
|
20
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
21
|
-
}
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
25
|
-
if (!isPlainObject(defaults)) {
|
|
26
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
27
|
-
}
|
|
28
|
-
const object = Object.assign({}, defaults);
|
|
29
|
-
for (const key in baseObject) {
|
|
30
|
-
if (key === "__proto__" || key === "constructor") {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const value = baseObject[key];
|
|
34
|
-
if (value === null || value === void 0) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
41
|
-
object[key] = [...value, ...object[key]];
|
|
42
|
-
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
43
|
-
object[key] = _defu(
|
|
44
|
-
value,
|
|
45
|
-
object[key],
|
|
46
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
47
|
-
merger
|
|
48
|
-
);
|
|
49
|
-
} else {
|
|
50
|
-
object[key] = value;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return object;
|
|
54
|
-
}
|
|
55
|
-
function createDefu(merger) {
|
|
56
|
-
return (...arguments_) => (
|
|
57
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
58
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
var defu = createDefu();
|
|
62
|
-
var defuFn = createDefu((object, key, currentValue) => {
|
|
63
|
-
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
64
|
-
object[key] = currentValue(object[key]);
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
var defuArrayFn = createDefu((object, key, currentValue) => {
|
|
69
|
-
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
70
|
-
object[key] = currentValue(object[key]);
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
7
|
// src/utils.ts
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
});
|
|
8
|
+
import {
|
|
9
|
+
defu,
|
|
10
|
+
defuOverrideArray
|
|
11
|
+
} from "@weapp-tailwindcss/shared";
|
|
82
12
|
|
|
83
13
|
// src/index.ts
|
|
84
14
|
var jiti = createJiti(import.meta.url);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.0",
|
|
4
|
+
"version": "1.1.2-alpha.0",
|
|
5
5
|
"description": "load tailwindcss config function",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
"registry": "https://registry.npmjs.org"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"jiti": "^2.
|
|
38
|
-
"lilconfig": "^3.1.3"
|
|
37
|
+
"jiti": "^2.6.1",
|
|
38
|
+
"lilconfig": "^3.1.3",
|
|
39
|
+
"@weapp-tailwindcss/shared": "1.1.0-alpha.0"
|
|
39
40
|
},
|
|
40
41
|
"scripts": {
|
|
41
42
|
"dev": "tsup --watch --sourcemap",
|