mirror of
https://github.com/toss/es-toolkit.git
synced 2024-11-28 12:05:41 +03:00
f1f55c8dc3
* feat(bindKey): implement bindKey * fix * make lint happy * Update docs/.vitepress/en.mts * Update benchmarks/performance/bindKey.bench.ts --------- Co-authored-by: Sojin Park <raon0211@gmail.com> Co-authored-by: Sojin Park <raon0211@toss.im>
113 lines
3.3 KiB
TypeScript
113 lines
3.3 KiB
TypeScript
import path from 'node:path';
|
|
import { type DefaultTheme, defineConfig } from 'vitepress';
|
|
import { getSidebarItems } from './libs/getSidebarItems.mts';
|
|
import { sortByText } from './libs/sortByText.mts';
|
|
|
|
const docsRoot = path.resolve(import.meta.dirname, '..');
|
|
|
|
export const en = defineConfig({
|
|
lang: 'en',
|
|
description:
|
|
'A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.',
|
|
|
|
themeConfig: {
|
|
nav: nav(),
|
|
|
|
sidebar: sidebar(),
|
|
|
|
editLink: {
|
|
pattern: 'https://github.com/toss/es-toolkit/edit/main/docs/:path',
|
|
text: 'Edit this page on GitHub',
|
|
},
|
|
|
|
footer: {
|
|
message: 'Released under the MIT License.',
|
|
copyright: `Copyright © ${new Date().getFullYear()} Viva Republica, Inc.`,
|
|
},
|
|
},
|
|
});
|
|
|
|
function nav(): DefaultTheme.NavItem[] {
|
|
return [
|
|
{ text: 'Home', link: '/' },
|
|
{ text: 'Introduction', link: '/intro' },
|
|
{ text: 'Reference', link: '/reference/array/chunk' },
|
|
];
|
|
}
|
|
|
|
function sidebar(): DefaultTheme.Sidebar {
|
|
return [
|
|
{
|
|
text: 'Guide',
|
|
items: [
|
|
{ text: 'Introduction', link: '/intro' },
|
|
{ text: 'Installation & Usage', link: '/usage' },
|
|
{ text: 'Impact on Bundle Size', link: '/bundle-size' },
|
|
{ text: 'Performance', link: '/performance' },
|
|
{ text: 'Compatibility with Lodash', link: '/compatibility' },
|
|
],
|
|
},
|
|
{
|
|
text: 'Reference',
|
|
items: sortByText([
|
|
{
|
|
text: 'Array Utilities',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'array'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'array'),
|
|
],
|
|
},
|
|
{
|
|
text: 'Function Utilities',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'function'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'function'),
|
|
],
|
|
},
|
|
{
|
|
text: 'Math Utilities',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'math'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'math'),
|
|
],
|
|
},
|
|
{
|
|
text: 'Object Utilities',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'object'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'object'),
|
|
],
|
|
},
|
|
{
|
|
text: 'Predicates',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'predicate'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'predicate'),
|
|
],
|
|
},
|
|
{
|
|
text: 'Promise Utilities',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'promise'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'promise'),
|
|
],
|
|
},
|
|
{
|
|
text: 'String Utilities',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'string'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'string'),
|
|
],
|
|
},
|
|
{
|
|
text: 'Errors',
|
|
items: [
|
|
...getSidebarItems(docsRoot, 'reference', 'error'),
|
|
...getSidebarItems.compat('en', docsRoot, 'reference', 'compat', 'error'),
|
|
],
|
|
},
|
|
]),
|
|
},
|
|
];
|
|
}
|