Skip to content

Commit b93c0a2

Browse files
committed
docs: pwa migration
1 parent e48a956 commit b93c0a2

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed

docs/.vuepress/config.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,28 @@ module.exports = {
1616
description: '🛠️ Стандартный инструментарий для разработки на Vue.js'
1717
}
1818
},
19-
serviceWorker: true,
2019
head: [
2120
['link', { rel: 'icon', href: '/favicon.png' }],
2221
],
22+
plugins: {
23+
'@vuepress/pwa': {
24+
serviceWorker: true,
25+
updatePopup: {
26+
'/': {
27+
message: "New content is available.",
28+
buttonText: "Refresh"
29+
},
30+
'/zh/': {
31+
message: "发现新内容可用",
32+
buttonText: "刷新"
33+
},
34+
'/ru/': {
35+
message: 'Доступно обновление контента',
36+
buttonText: 'Обновить'
37+
}
38+
}
39+
}
40+
},
2341
theme: '@vuepress/theme-vue',
2442
themeConfig: {
2543
repo: 'vuejs/vue-cli',
@@ -37,12 +55,6 @@ module.exports = {
3755
selectText: 'Languages',
3856
lastUpdated: 'Last Updated',
3957
editLinkText: 'Edit this page on GitHub',
40-
serviceWorker: {
41-
updatePopup: {
42-
message: "New content is available.",
43-
buttonText: "Refresh"
44-
}
45-
},
4658
nav: [
4759
{
4860
text: 'Guide',
@@ -135,12 +147,6 @@ module.exports = {
135147
selectText: '选择语言',
136148
lastUpdated: '上次编辑时间',
137149
editLinkText: '在 GitHub 上编辑此页',
138-
serviceWorker: {
139-
updatePopup: {
140-
message: "发现新内容可用",
141-
buttonText: "刷新"
142-
}
143-
},
144150
nav: [
145151
{
146152
text: '指南',
@@ -224,12 +230,6 @@ module.exports = {
224230
selectText: 'Переводы',
225231
lastUpdated: 'Последнее обновление',
226232
editLinkText: 'Изменить эту страницу на GitHub',
227-
serviceWorker: {
228-
updatePopup: {
229-
message: 'Доступно обновление контента',
230-
buttonText: 'Обновить'
231-
}
232-
},
233233
nav: [
234234
{
235235
text: 'Руководство',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
},
4545
"devDependencies": {
4646
"@vue/conventional-changelog": "^0.1.1",
47+
"@vuepress/plugin-pwa": "^1.0.0-alpha.44",
4748
"@vuepress/theme-vue": "1.0.0-alpha.44",
4849
"babel-core": "7.0.0-bridge.0",
4950
"babel-eslint": "^10.0.1",

yarn.lock

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,6 +2020,15 @@
20202020
dependencies:
20212021
nprogress "^0.2.0"
20222022

2023+
"@vuepress/plugin-pwa@^1.0.0-alpha.44":
2024+
version "1.0.0-alpha.44"
2025+
resolved "https://registry.yarnpkg.com/@vuepress/plugin-pwa/-/plugin-pwa-1.0.0-alpha.44.tgz#2cfe73e3d6c01487da988bac554b01afa6d19753"
2026+
integrity sha512-bWUwDNeiehLxxSmCpBPQJIr771oNuSrLCSEqDp7rVz+k/Rca28NYUulF/+KsKGFfnpi5cZeUBff35DPeb97R7g==
2027+
dependencies:
2028+
"@vuepress/shared-utils" "^1.0.0-alpha.44"
2029+
register-service-worker "^1.5.2"
2030+
workbox-build "^3.1.0"
2031+
20232032
"@vuepress/plugin-register-components@^1.0.0-alpha.44":
20242033
version "1.0.0-alpha.44"
20252034
resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.0.0-alpha.44.tgz#7ef30c9e0516d19ba6b8e577cba6eda6e808753d"
@@ -6297,7 +6306,7 @@ eslint-plugin-vue@^4.5.0, eslint-plugin-vue@^4.7.1:
62976306
dependencies:
62986307
vue-eslint-parser "^2.0.3"
62996308

6300-
eslint-plugin-vue@^5.0.0, eslint-plugin-vue@^5.2.2:
6309+
eslint-plugin-vue@^5.2.2:
63016310
version "5.2.2"
63026311
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-5.2.2.tgz#86601823b7721b70bc92d54f1728cfc03b36283c"
63036312
integrity sha512-CtGWH7IB0DA6BZOwcV9w9q3Ri6Yuo8qMjx05SmOGJ6X6E0Yo3y9E/gQ5tuNxg2dEt30tRnBoFTbvtmW9iEoyHA==
@@ -14055,7 +14064,7 @@ regexpu-core@^4.1.3, regexpu-core@^4.2.0:
1405514064
unicode-match-property-ecmascript "^1.0.4"
1405614065
unicode-match-property-value-ecmascript "^1.0.2"
1405714066

14058-
register-service-worker@^1.6.2:
14067+
register-service-worker@^1.5.2, register-service-worker@^1.6.2:
1405914068
version "1.6.2"
1406014069
resolved "https://registry.yarnpkg.com/register-service-worker/-/register-service-worker-1.6.2.tgz#9297e54c205c371c6e49bfa88f6997e8dd315f4c"
1406114070
integrity sha512-I8L87fX2TK29LDx+wgyOUh2BJ3rDIRC1FtRZEHeP3rivzDv6p1DDZLGGtPucqjEkm45+2crtFIFssEWv56+9Wg==
@@ -17162,7 +17171,7 @@ workbox-broadcast-cache-update@^3.6.3:
1716217171
dependencies:
1716317172
workbox-core "^3.6.3"
1716417173

17165-
workbox-build@^3.6.3:
17174+
workbox-build@^3.1.0, workbox-build@^3.6.3:
1716617175
version "3.6.3"
1716717176
resolved "https://registry.yarnpkg.com/workbox-build/-/workbox-build-3.6.3.tgz#77110f9f52dc5d82fa6c1c384c6f5e2225adcbd8"
1716817177
integrity sha512-w0clZ/pVjL8VXy6GfthefxpEXs0T8uiRuopZSFVQ8ovfbH6c6kUpEh6DcYwm/Y6dyWPiCucdyAZotgjz+nRz8g==

0 commit comments

Comments
 (0)