Skip to content

Commit

Permalink
chore: Update dependencies and import statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Big-Cake-jpg committed Jul 27, 2024
1 parent ca632ae commit 1a6cba9
Show file tree
Hide file tree
Showing 5 changed files with 2,806 additions and 2,710 deletions.
21 changes: 0 additions & 21 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import type { DefaultTheme } from "vitepress/theme"
import { withPwa, type PwaOptions } from "@vite-pwa/vitepress"
import { BiDirectionalLinks } from "@nolebase/markdown-it-bi-directional-links"
import { InlineLinkPreviewElementTransform } from "@nolebase/vitepress-plugin-inline-link-preview/markdown-it"
import {
GitChangelog,
GitChangelogMarkdownSection,
} from "@nolebase/vitepress-plugin-git-changelog/vite"

const COMMIT_ID =
process.env.COMMIT_REF ||
Expand Down Expand Up @@ -41,23 +37,6 @@ const viteConfig = {
"@nolebase/vitepress-plugin-inline-link-preview",
],
},
plugins: [
GitChangelog({
// 填写在此处填写您的仓库链接
repoURL: () => "https://github.com/GlobeMC/crashmc.com",
rewritePaths: {
"docs/": "",
},
}),
GitChangelogMarkdownSection({
locales: {
gitChangelogMarkdownSectionTitles: {
changelog: "文件历史",
contributors: "贡献者",
},
},
}),
],
}

const pwaConfig: PwaOptions = {
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/Analyzer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import JSZip from "jszip"
import pako from "pako"
import { TarReader } from "@gera2ld/tarjs"
import { useRouter } from "vitepress"
import { useRouter } from "vitepress/client"
import { type Ref, ref, watch, onBeforeMount, onUnmounted } from "vue"
import axios from "axios"
import AnalyzingIcon from "./icons/AnalyzingIcon.vue"
Expand Down
101 changes: 5 additions & 96 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import type { EnhanceAppContext } from "vitepress"
import { useData, useRoute } from "vitepress"
import type { EnhanceAppContext } from "vitepress/client"
import { useData } from "vitepress/client"
import { useRoute } from "vitepress/client"
import DefaultTheme from "vitepress/theme"
import { h } from "vue"

// Components
import LauncherBadge from "./global-components/LauncherBadge.vue"
import ReloadPrompt from "./components/ReloadPrompt.vue"
import Posts from "./layouts/Posts.vue"
import Contributors from "./components/Contributors.vue"

// Plugins
import giscusTalk from "vitepress-plugin-comment-with-giscus"
Expand All @@ -20,11 +22,7 @@ import {
NolebaseEnhancedReadabilitiesScreenMenu,
} from "@nolebase/vitepress-plugin-enhanced-readabilities/client"
import { NolebaseInlineLinkPreviewPlugin } from "@nolebase/vitepress-plugin-inline-link-preview/client"
import { InjectionKey } from "@nolebase/vitepress-plugin-git-changelog/client"
import "@nolebase/vitepress-plugin-inline-link-preview/client/style.css"
import { NolebaseGitChangelogPlugin } from "@nolebase/vitepress-plugin-git-changelog/client"

import "@nolebase/vitepress-plugin-git-changelog/client/style.css"

// Styles
import "./style.css"
Expand All @@ -49,6 +47,7 @@ export default {
// 为较窄的屏幕(通常是小于 iPad Mini)添加阅读增强菜单
"nav-screen-content-after": () =>
h(NolebaseEnhancedReadabilitiesScreenMenu),
"doc-footer-before": () => h(Contributors),
})
},
enhanceApp(ctx: EnhanceAppContext) {
Expand All @@ -61,96 +60,6 @@ export default {
vitepressNprogress(ctx)
ctx.app.component("vImageViewer", vImageViewer)
ctx.app.use(NolebaseInlineLinkPreviewPlugin)
ctx.app.use(NolebaseGitChangelogPlugin)
ctx.app.provide(InjectionKey, {
mapContributors: [
{
name: "Big_Cake",
nameAliases: ["Big-Cake-jpg", "Big_Cake"],
avatar: generateAvatarUrl("Big-Cake-jpg"),
},
{
name: "bingling_sama",
nameAliases: ["bingling-sama", "bingling_sama"],
avatar: generateAvatarUrl("bingling-sama"),
},
{
name: "柚子柚子",
nameAliases: ["youzi-2333", "柚子柚子"],
avatar: generateAvatarUrl("youzi-2333"),
},
{
name: "Pigeon0v0",
nameAliases: ["bwtx2023", "bwtx1981", "Yousa Ling", "Pigeon0v0"],
avatar: generateAvatarUrl("Pigeon0v0"),
},
{
name: "233355607",
nameAliases: ["2623684696", "233355607"],
avatar: generateAvatarUrl("2623684696"),
},
{
name: "hejiehao",
nameAliases: ["何杰豪", "hejiehao"],
avatar: generateAvatarUrl("hejiehao"),
},
{
name: "Rovniced",
nameAliases: ["Rovniced", "Enlysure"],
avatar: generateAvatarUrl("Rovniced"),
},
{
name: "zyxkad",
nameAliases: ["zyxkad", "Kevin Z"],
avatar: generateAvatarUrl("zyxkad"),
},
{
name: "HRxiaohu",
nameAliases: ["HRxiaohu"],
avatar: generateAvatarUrl("HRxiaohu"),
},
{
name: "Pysio",
nameAliases: ["pysio2007", "Pysio"],
avatar: generateAvatarUrl("pysio2007"),
},
{
name: "XieXiLin",
nameAliases: ["XieXiLin", "XieXiLin2"],
avatar: generateAvatarUrl("XieXiLin2"),
},
{
name: "Z_Tsin",
nameAliases: ["Z_Tsin", "ztsinsun"],
avatar: generateAvatarUrl("ztsinsun"),
},
{
name: "9Bakabaka",
nameAliases: ["9Bakabaka"],
avatar: generateAvatarUrl("9Bakabaka"),
},
{
name: "ZhuRuoLing",
nameAliases: ["ZhuRuoLing"],
avatar: generateAvatarUrl("ZhuRuoLing"),
},
{
name: "bingxin666",
nameAliases: ["bingxin666"],
avatar: generateAvatarUrl("bingxin666"),
},
{
name: "zkitefly",
nameAliases: ["zkitefly"],
avatar: generateAvatarUrl("zkitefly"),
},
{
name: "思遥方",
nameAliases: ["Seayay", "思遥方"],
avatar: generateAvatarUrl("Seayay"),
},
],
})
// Why it doesn't work?
// const layouts = import.meta.glob("./layouts/*.vue")
// for (const path in layouts) {
Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@
"type": "module",
"devDependencies": {
"@andatoshiki/vitepress-plugin-nprogress": "^0.0.1",
"@giscus/vue": "^2.4.0",
"@nolebase/markdown-it-bi-directional-links": "2.0.0-rc10",
"@nolebase/vitepress-plugin-enhanced-readabilities": "2.0.0-rc10",
"@nolebase/vitepress-plugin-git-changelog": "2.0.0-rc10",
"@nolebase/vitepress-plugin-inline-link-preview": "2.0.0-rc10",
"@giscus/vue": "^3.0.0",
"@nolebase/markdown-it-bi-directional-links": "2.3.0",
"@nolebase/vitepress-plugin-enhanced-readabilities": "2.3.0",
"@nolebase/vitepress-plugin-git-changelog": "2.3.0",
"@nolebase/vitepress-plugin-inline-link-preview": "2.3.0",
"@types/pako": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@vite-pwa/assets-generator": "^0.2.4",
"@vite-pwa/vitepress": "^0.4.0",
"@vite-pwa/vitepress": "^0.5.0",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier-vue": "^4.2.0",
"eslint-plugin-vue": "^9.25.0",
"husky": "^8.0.3",
"prettier": "^3.2.5",
"sass": "^1.76.0",
"tslib": "^2.6.2",
"vite": "^5.2.10",
"vite-plugin-pwa": "^0.19.8",
"vitepress": "1.1.4",
"vue": "^3.4.26",
"vue-eslint-parser": "^9.4.2",
"vue-tsc": "^1.8.27",
"eslint-plugin-prettier-vue": "^5.0.0",
"eslint-plugin-vue": "^9.27.0",
"husky": "^9.1.3",
"prettier": "^3.3.3",
"sass": "^1.77.8",
"tslib": "^2.6.3",
"vite": "^5.3.5",
"vite-plugin-pwa": "^0.20.1",
"vitepress": "1.3.1",
"vue": "^3.4.34",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^2.0.29",
"workbox-window": "^7.1.0",
"zhlint": "^0.7.4"
"zhlint": "^0.8.1"
},
"keywords": [
"Minecraft",
Expand All @@ -52,16 +52,16 @@
"author": "GlobeMC / 河豚分析",
"license": "GFDL",
"dependencies": {
"@gera2ld/tarjs": "^0.2.2",
"@gera2ld/tarjs": "^0.3.1",
"@types/js-cookie": "^3.0.6",
"@types/umami": "^0.1.5",
"@typescript-eslint/parser": "^6.21.0",
"axios": "^1.6.8",
"directory-tree": "^3.5.1",
"@types/umami": "^2.10.0",
"@typescript-eslint/parser": "^7.17.0",
"axios": "^1.7.2",
"directory-tree": "^3.5.2",
"js-cookie": "^3.0.5",
"jszip": "^3.10.1",
"pako": "^2.1.0",
"typescript": "^5.4.5",
"typescript": "^5.5.4",
"viewerjs": "^1.11.6",
"vitepress-plugin-back-to-top": "^1.0.1",
"vitepress-plugin-codeblocks-fold": "^1.2.28",
Expand Down
Loading

0 comments on commit 1a6cba9

Please sign in to comment.