@ludoloops/svelteforge 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -263,12 +263,16 @@ function applyLandingMode(sv, landingFiles, fullstackFiles, projectName) {
263
263
  return barrel;
264
264
  });
265
265
  sv.file("src/lib/components/ui/form/index.ts", () => {
266
- const formComponents = [];
266
+ const svelteComponents = [];
267
+ const tsFiles = [];
267
268
  for (const path of [...uiFormFiles.keys()].sort()) {
268
- const baseName = (path.split("/").pop() || "").replace(".svelte", "");
269
- formComponents.push(baseName);
269
+ const name = path.split("/").pop() || "";
270
+ if (name.endsWith(".svelte")) svelteComponents.push(name.replace(".svelte", ""));
271
+ else if (name.endsWith(".ts") && name !== "index.ts") tsFiles.push(name);
270
272
  }
271
- return `${formComponents.map((c) => `import ${c} from './${c}.svelte';`).join("\n")}\n\nexport { ${formComponents.join(", ")} };\n`;
273
+ let result = `${svelteComponents.map((c) => `import ${c} from './${c}.svelte';`).join("\n")}\n\nexport { ${svelteComponents.join(", ")} };\n`;
274
+ for (const ts of tsFiles) result += `export * from './${ts}';\n`;
275
+ return result;
272
276
  });
273
277
  sv.file("src/lib/components/layout/index.ts", () => {
274
278
  return generateBarrel(layoutFiles, "/lib/components/layout/");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludoloops/svelteforge",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "sv community addon — 34 theme-aware UI components, admin dashboard, and 3-layer theme system for SvelteKit",
6
6
  "author": "Ludo (https://lelab.dev)",