Skip to content

Commit

Permalink
fix: ensure "add" utility exports types as well (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Jun 6, 2024
1 parent 4331a20 commit 0f6f102
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-scissors-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"runed": patch
---

fix: ensure "add" utility exports types as well
2 changes: 1 addition & 1 deletion packages/runed/src/lib/utilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export * from "./PressedKeys/index.js";
export * from "./MediaQuery/index.js";
export * from "./ElementRect/index.js";
export * from "./useMutationObserver/index.js";
export { useResizeObserver } from "./useResizeObserver/index.js";
export * from "./useResizeObserver/index.js";
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { useMutationObserver } from "./useMutationObserver.svelte.js";
export * from "./useMutationObserver.svelte.js";
4 changes: 2 additions & 2 deletions scripts/add-utility.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const contentFile = `${contentDir}/${toKebabCase(utilName)}.md`;
const demoFile = `${demosDir}/${toKebabCase(utilName)}.svelte`;

fs.mkdirSync(utilDir, { recursive: true });
fs.writeFileSync(utilIndexFile, `export { ${utilName} } from "./${utilName}.svelte.js";`);
fs.writeFileSync(utilIndexFile, `export * from "./${utilName}.svelte.js";`);
fs.writeFileSync(utilMainFile, "");
fs.appendFileSync(utilsBarrelFile, `export { ${utilName} } from "./${utilName}/index.js";`);
fs.appendFileSync(utilsBarrelFile, `export * from "./${utilName}/index.js";`);

fs.writeFileSync(
contentFile,
Expand Down

0 comments on commit 0f6f102

Please sign in to comment.