Skip to content

Commit

Permalink
docs: fix type file import
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed Dec 7, 2024
1 parent 61c60da commit 4d75b16
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { withSidebar } from '../../dist';
import { repository, homepage } from '../../package.json';
import { withSidebar } from '../../dist/index.js';
import packageJson from '../../package.json' with { type: 'json' };
import { defineConfig, UserConfig } from 'vitepress';
import { withI18n } from 'vitepress-i18n';
import { VitePressI18nOptions } from 'vitepress-i18n/dist/types';
import type { VitePressSidebarOptions } from '../../dist/types';
import { VitePressI18nOptions } from 'vitepress-i18n/types';
import type { VitePressSidebarOptions } from '../../dist/types.js';

const defaultLocale: string = 'en';
const supportLocales: string[] = [defaultLocale, 'ko', 'zhHans'];
const editLinkPattern = `${repository.url}/edit/master/docs/:path`;
const editLinkPattern = `${packageJson.repository.url}/edit/master/docs/:path`;

const commonSidebarConfig: VitePressSidebarOptions = {
debugPrint: true,
Expand Down Expand Up @@ -112,7 +112,7 @@ const vitePressConfig: UserConfig = {
['link', { rel: 'shortcut icon', href: '/favicon.ico' }]
],
sitemap: {
hostname: homepage
hostname: packageJson.homepage
},
themeConfig: {
logo: { src: '/logo-32.png', width: 24, height: 24 },
Expand All @@ -121,7 +121,7 @@ const vitePressConfig: UserConfig = {
},
socialLinks: [
{ icon: 'npm', link: 'https://www.npmjs.com/package/vitepress-sidebar' },
{ icon: 'github', link: repository.url.replace('.git', '') }
{ icon: 'github', link: packageJson.repository.url.replace('.git', '') }
],
footer: {
message: 'Released under the MIT License',
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vitepress": "^1.5.0",
"vitepress-i18n": "^1.3.0"
"vitepress-i18n": "^1.3.1"
},
"dependencies": {
"glob": "10.4.5",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compilerOptions": {
"baseUrl": "lib",
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["esnext"],
"esModuleInterop": true,
"resolveJsonModule": true,
Expand Down

0 comments on commit 4d75b16

Please sign in to comment.