Skip to content

Commit 982f334

Browse files
authored
chore: upgrade vuepress (#3274)
1 parent 66f6f7b commit 982f334

File tree

4 files changed

+3105
-2261
lines changed

4 files changed

+3105
-2261
lines changed

Diff for: docs/.vuepress/config.js

+19-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
module.exports = ctx => ({
22
locales: {
33
'/': {
44
lang: 'en-US',
@@ -53,15 +53,26 @@ module.exports = {
5353
}
5454
]
5555
],
56-
serviceWorker: true,
57-
theme: 'vue',
56+
theme: '@vuepress/vue',
57+
plugins: [
58+
[
59+
'@vuepress/pwa',
60+
{
61+
serviceWorker: true,
62+
updatePopup: true
63+
}
64+
]
65+
],
5866
themeConfig: {
59-
algolia: {
60-
apiKey: 'f854bb46d3de7eeb921a3b9173bd0d4c',
61-
indexName: 'vue-router'
62-
},
67+
algolia: ctx.isProd
68+
? {
69+
apiKey: 'f854bb46d3de7eeb921a3b9173bd0d4c',
70+
indexName: 'vue-router'
71+
}
72+
: null,
6373
repo: 'vuejs/vue-router',
6474
docsDir: 'docs',
75+
smoothScroll: true,
6576
locales: {
6677
'/': {
6778
label: 'English',
@@ -366,4 +377,4 @@ module.exports = {
366377
}
367378
}
368379
}
369-
}
380+
})
File renamed without changes.

Diff for: package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
]
6060
},
6161
"devDependencies": {
62+
"@vuepress/plugin-pwa": "^1.5.3",
63+
"@vuepress/theme-vue": "^1.5.3",
6264
"axios": "^0.19.0",
6365
"babel-core": "^6.24.1",
6466
"babel-eslint": "^10.0.2",
@@ -97,10 +99,10 @@
9799
"selenium-server": "^3.141.59",
98100
"terser": "^4.2.0",
99101
"typescript": "^3.5.2",
100-
"vue": "^2.5.16",
101-
"vue-loader": "^15.2.1",
102-
"vue-template-compiler": "^2.5.16",
103-
"vuepress": "^0.14.11",
102+
"vue": "^2.6.11",
103+
"vue-loader": "^15.9.3",
104+
"vue-template-compiler": "^2.6.11",
105+
"vuepress": "^1.5.3",
104106
"vuepress-theme-vue": "^1.1.1",
105107
"webpack": "^4.35.2",
106108
"webpack-dev-middleware": "^3.7.0",

0 commit comments

Comments
 (0)