Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liziwl committed Nov 16, 2024
1 parent fd4a5d7 commit d297df0
Show file tree
Hide file tree
Showing 4 changed files with 2,971 additions and 3,278 deletions.
21 changes: 21 additions & 0 deletions docs/.vuepress/components/vite-plugin-vue-process-exit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default function ProcessExitPlugin() {
return {
name: 'ProcessExitPlugin',

// catch the end of a build with errors
buildEnd(error?: Error) {
if (error) {
console.error('Build failed:', error)
process.exit(1)
} else {
console.log('Build succeeded')
}
},

// catch the end of a build without errors
closeBundle() {
console.log('Build finished')
process.exit(0)
},
}
}
2 changes: 2 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { tocPlugin } from '@vuepress/plugin-toc'
import { sitemapPlugin } from "@vuepress/plugin-sitemap"
import { defineUserConfig } from '@vuepress/cli'
import { viteBundler } from '@vuepress/bundler-vite'
import ProcessExitPlugin from './components/vite-plugin-vue-process-exit'

const ogprefix = 'og: http://ogp.me/ns#'
const title = '南科手册'
Expand Down Expand Up @@ -198,6 +199,7 @@ export default defineUserConfig({
hostname: "https://sustech.online/",
}),
tocPlugin(),
ProcessExitPlugin(),
],
theme: defaultTheme({
navbar: [
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@vuepress/plugin-sitemap": "next",
"@vuepress/plugin-toc": "next",
"@vuepress/theme-default": "next",
"ant-design-vue": "^4.2.3",
"ant-design-vue": "^4.2.6",
"vue-echarts": "~6.2.4",
"vuepress": "next"
},
Expand All @@ -24,11 +24,11 @@
"docs:clean": "rm -rf docs/.vuepress/.cache docs/.vuepress/.temp docs/.vuepress/dist"
},
"dependencies": {
"@turf/turf": "^7.0.0",
"axios": "^1.7.4",
"@turf/turf": "^7.1.0",
"axios": "^1.7.7",
"download": "^8.0.0",
"echarts": "^5.5.1",
"maplibre-gl": "^4.5.0",
"vue": "^3.4.32"
"maplibre-gl": "^4.7.1",
"vue": "^3.5.13"
}
}
Loading

0 comments on commit d297df0

Please sign in to comment.