Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize docs build performance #5228

Merged
merged 19 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .parcelrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
"namers": ["parcel-namer-docs", "..."],
"packagers": {
"*.json": "parcel-packager-docs",
"*.html": "@parcel/packager-js"
"*.html": "parcel-packager-ssg"
},
"optimizers": {
"*.html": ["parcel-optimizer-ssg", "..."],
"*.js": ["@parcel/optimizer-terser"]
}
}
6 changes: 3 additions & 3 deletions packages/@react-spectrum/button/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>,
props = useSlotProps(props, 'button');
props = disablePendingProps(props);
let {
elementType: ElementType = 'button',
elementType: Element = 'button',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to accommodate the docs generator. It was getting confused between ElementType declared here and the one used in the type parameter. Found by the new console.log added in DocsPackager.

children,
variant,
style = variant === 'accent' || variant === 'cta' ? 'fill' : 'outline',
Expand Down Expand Up @@ -100,7 +100,7 @@ function Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>,

return (
<FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>
<ElementType
<Element
{...styleProps}
{...mergeProps(buttonProps, hoverProps)}
ref={domRef}
Expand Down Expand Up @@ -143,7 +143,7 @@ function Button<T extends ElementType = 'button'>(props: SpectrumButtonProps<T>,
? <Text>{children}</Text>
: children}
</SlotProvider>
</ElementType>
</Element>
</FocusRing>
);
}
Expand Down
115 changes: 0 additions & 115 deletions packages/dev/parcel-optimizer-ssg/SSGOptimizer.js

This file was deleted.