silgi 0.36.16 → 0.36.17
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/build.mjs +13 -6
- package/dist/cli/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -1118,12 +1118,19 @@ async function prepareScanFile(silgi) {
|
|
|
1118
1118
|
];
|
|
1119
1119
|
const generateExport = (name, items, defaultEmpty = "{}") => {
|
|
1120
1120
|
const hasItems = items.length > 0;
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1121
|
+
if (hasItems) {
|
|
1122
|
+
return [
|
|
1123
|
+
`export const ${name} = deepMergeObjects([`,
|
|
1124
|
+
...items.map((item) => ` ${item},`),
|
|
1125
|
+
"])",
|
|
1126
|
+
""
|
|
1127
|
+
];
|
|
1128
|
+
} else {
|
|
1129
|
+
return [
|
|
1130
|
+
`export const ${name} = ${defaultEmpty}`,
|
|
1131
|
+
""
|
|
1132
|
+
];
|
|
1133
|
+
}
|
|
1127
1134
|
};
|
|
1128
1135
|
const importData = [
|
|
1129
1136
|
"",
|
package/dist/cli/index.mjs
CHANGED