Skip to content

Commit

Permalink
fix: postbuild script
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgarciadev committed Jan 16, 2025
1 parent 6492d36 commit 1d5e452
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
5 changes: 0 additions & 5 deletions .changeset/friendly-hounds-walk.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/hot-owls-sniff.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quick-peas-care.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/quiet-cups-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@heroui/react": patch
---

Post build script fixed
9 changes: 7 additions & 2 deletions packages/core/react/src/scripts/postbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ function generateComponents() {

for (const component of components) {
if (EXCLUDE_LIST.includes(component)) continue;

// Find the route for this component
const routeComponent = routes.find(route => route.key === component) || {};

// Skip if component is marked as comingSoon
if (routeComponent.comingSoon) continue;

const componentPath = path.resolve(componentsDir, component);

const componentPkg = require(path.resolve(componentPath, 'package.json'));
Expand All @@ -42,8 +49,6 @@ function generateComponents() {
const componentDocs = `${baseDocs}/${component}`;
const componentDesc = componentPkg.description;

const routeComponent = routes.find(route => route.key === component) || {};

// Add style alias for the component
const mdxComponentPath = path.resolve(docsComponentsDir, `${component}.mdx`);
const mdxComponentContent = fs.existsSync(mdxComponentPath) && fs.readFileSync(mdxComponentPath, 'utf8') || '';
Expand Down

0 comments on commit 1d5e452

Please sign in to comment.