mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
build: multi-config build and dep update
This commit is contained in:
@@ -27,7 +27,7 @@ export const generateStaticParams = async () => {
|
||||
const params: VersionRouteParams[] = [];
|
||||
|
||||
await Promise.all(
|
||||
PACKAGES.slice(1).map(async (packageName) => {
|
||||
PACKAGES.map(async (packageName) => {
|
||||
const versions = (await fetchVersions(packageName)).slice(0, N_RECENT_VERSIONS);
|
||||
|
||||
params.push(...versions.map((version) => ({ package: packageName, version })));
|
||||
|
||||
@@ -17,7 +17,10 @@ export function InstallButton() {
|
||||
|
||||
return (
|
||||
<button
|
||||
className={buttonVariants({ variant: 'secondary', className: 'cursor-copy font-mono' })}
|
||||
className={buttonVariants({
|
||||
variant: 'secondary',
|
||||
className: 'cursor-copy font-mono',
|
||||
})}
|
||||
onClick={() => {
|
||||
setInteracted(true);
|
||||
copyToClipboard('npm install discord.js');
|
||||
|
||||
@@ -15,7 +15,10 @@ export default function OverloadSwitcher({
|
||||
methodName,
|
||||
overloads,
|
||||
children,
|
||||
}: PropsWithChildren<{ readonly methodName: string; readonly overloads: ReactNode[] }>) {
|
||||
}: PropsWithChildren<{
|
||||
readonly methodName: string;
|
||||
readonly overloads: ReactNode[];
|
||||
}>) {
|
||||
const [hash, setHash] = useState(() => (typeof window === 'undefined' ? '' : window.location.hash));
|
||||
const hashChangeHandler = useCallback(() => {
|
||||
setHash(window.location.hash);
|
||||
|
||||
@@ -12,7 +12,11 @@ export default function PackageSelect() {
|
||||
const pathname = usePathname();
|
||||
const packageName = pathname?.split('/').slice(3, 4)[0];
|
||||
|
||||
const packageMenu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true });
|
||||
const packageMenu = useMenuState({
|
||||
gutter: 8,
|
||||
sameWidth: true,
|
||||
fitViewport: true,
|
||||
});
|
||||
|
||||
const packageMenuItems = useMemo(
|
||||
() =>
|
||||
|
||||
@@ -14,7 +14,11 @@ export default function VersionSelect({ versions }: { readonly versions: string[
|
||||
const packageName = pathname?.split('/').slice(3, 4)[0];
|
||||
const branchName = pathname?.split('/').slice(4, 5)[0];
|
||||
|
||||
const versionMenu = useMenuState({ gutter: 8, sameWidth: true, fitViewport: true });
|
||||
const versionMenu = useMenuState({
|
||||
gutter: 8,
|
||||
sameWidth: true,
|
||||
fitViewport: true,
|
||||
});
|
||||
|
||||
const versionMenuItems = useMemo(
|
||||
() =>
|
||||
|
||||
@@ -13,7 +13,9 @@ export function Block({ children, title }: PropsWithChildren<{ readonly title: s
|
||||
export function ExampleBlock({
|
||||
children,
|
||||
exampleIndex,
|
||||
}: PropsWithChildren<{ readonly exampleIndex?: number | undefined }>): JSX.Element {
|
||||
}: PropsWithChildren<{
|
||||
readonly exampleIndex?: number | undefined;
|
||||
}>): JSX.Element {
|
||||
return <Block title={`Example ${exampleIndex ? exampleIndex : ''}`}>{children}</Block>;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ import {
|
||||
useMemo,
|
||||
} from 'react';
|
||||
|
||||
export const NavContext = createContext<{ opened: boolean; setOpened: Dispatch<SetStateAction<boolean>> }>({
|
||||
export const NavContext = createContext<{
|
||||
opened: boolean;
|
||||
setOpened: Dispatch<SetStateAction<boolean>>;
|
||||
}>({
|
||||
opened: false,
|
||||
setOpened: (_) => {},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user