Skip to content

Commit 4245616

Browse files
committed
feat: Support JSON5 (#136)
1 parent 8ad8c7f commit 4245616

File tree

16 files changed

+87
-78
lines changed

16 files changed

+87
-78
lines changed

.vscode/extensions.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
"Vue.volar",
44
"antfu.unocss",
55
"antfu.goto-alias",
6-
"lokalise.i18n-ally",
76
"antfu.iconify",
8-
"antfu.file-nesting"
7+
"antfu.file-nesting",
8+
"lokalise.i18n-ally",
9+
"blueglassblock.better-json5",
10+
"dbaeumer.vscode-eslint"
911
]
1012
}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"html",
3434
"markdown",
3535
"json",
36+
"json5",
3637
"jsonc",
3738
"yaml",
3839
"toml",

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ An mobile web apps template based on the Vue 3 ecosystem.
2020

2121
[文档](https://easy-temps.github.io/easy-docs/vue3-vant-mobile/) / [交流](https://github.com/easy-temps/vue3-vant-mobile/issues/56) / [反馈](https://github.com/easy-temps/vue3-vant-mobile/issues)
2222

23-
<a href="https://vue3-vant-mobile.netlify.app">Live Demo</a>
23+
<a href="https://vue3-vant-mobile.netlify.app">🖥 Live Demo</a>
2424

2525
[![Netlify Status](https://api.netlify.com/api/v1/badges/e6828bd2-2904-4c3e-a67c-b97d32aa1275/deploy-status)](https://app.netlify.com/sites/vue3-vant-mobile/deploys)
2626

@@ -114,11 +114,14 @@ An mobile web apps template based on the Vue 3 ecosystem.
114114
- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
115115
- [Netlify](https://www.netlify.com/) - zero-config deployment
116116
- [VS Code Extensions](./.vscode/extensions.json)
117-
- [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically
118117
- [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 3 `<script setup>` IDE support
118+
- [Unocss](https://marketplace.visualstudio.com/items?itemName=antfu.unocss) - UnoCSS for VS Code
119+
- [Goto Alias](https://marketplace.visualstudio.com/items?itemName=antfu.goto-alias) - Go to Definition following alias redirections
119120
- [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - Icon inline display and autocomplete
121+
- [File Nesting](https://marketplace.visualstudio.com/items?itemName=antfu.file-nesting) - Config of File Nesting for VS Code
120122
- [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - All in one i18n support
121-
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
123+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Eslint support
124+
- [Better JSON5](https://marketplace.visualstudio.com/items?itemName=blueglassblock.better-json5) - JSON5 support
122125

123126
## Try it now
124127

README.zh-CN.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ An mobile web apps template based on the Vue 3 ecosystem.
2020

2121
[文档](https://easy-temps.github.io/easy-docs/vue3-vant-mobile/) / [交流](https://github.com/easy-temps/vue3-vant-mobile/issues/56) / [反馈](https://github.com/easy-temps/vue3-vant-mobile/issues)
2222

23-
<a href="https://vue3-vant-mobile.netlify.app">在线 Demo</a>
23+
<a href="https://vue3-vant-mobile.netlify.app">🖥 在线 Demo</a>
2424

2525
[![Netlify Status](https://api.netlify.com/api/v1/badges/e6828bd2-2904-4c3e-a67c-b97d32aa1275/deploy-status)](https://app.netlify.com/sites/vue3-vant-mobile/deploys)
2626

@@ -114,11 +114,14 @@ An mobile web apps template based on the Vue 3 ecosystem.
114114
- [pnpm](https://pnpm.js.org/) - 快, 节省磁盘空间的包管理器
115115
- [Netlify](https://www.netlify.com/) - 零配置的部署
116116
- [VS Code Extensions](./.vscode/extensions.json)
117-
- [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - 自动启动 Vite 服务器
118117
- [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 3 `<script setup>` IDE 支持
118+
- [Unocss](https://marketplace.visualstudio.com/items?itemName=antfu.unocss) - Unocss 智能提示
119+
- [Goto Alias](https://marketplace.visualstudio.com/items?itemName=antfu.goto-alias) - 跳转到定义
119120
- [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - 图标内联显示和自动补全
121+
- [File Nesting](https://marketplace.visualstudio.com/items?itemName=antfu.file-nesting) - 文件嵌套
120122
- [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - 多合一的 I18n 支持
121-
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
123+
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - ESLint 支持
124+
- [Better JSON5](https://marketplace.visualstudio.com/items?itemName=blueglassblock.better-json5) - JSON5 支持
122125

123126
## 现在可以试试
124127

src/pages/[...all].vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ function onBack() {
2222
</div>
2323
</template>
2424

25-
<route lang="json">
25+
<route lang="json5">
2626
{
27-
"name": "404",
28-
"meta": {
29-
"title": "404",
30-
"i18n": "menus.404Demo"
31-
}
27+
name: '404',
28+
meta: {
29+
title: '404',
30+
i18n: 'menus.404Demo'
31+
},
3232
}
3333
</route>

src/pages/charts/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ const refScoreOption = ref(scoreOption)
6565
<Chart :option="refScoreOption" :style="{ height: '330px' }" />
6666
</template>
6767

68-
<route lang="json">
68+
<route lang="json5">
6969
{
70-
"name": "charts",
71-
"meta": {
72-
"title": "📊 Echarts 演示",
73-
"i18n": "menus.echartsDemo"
74-
}
70+
name: 'charts',
71+
meta: {
72+
title: '📊 Echarts 演示',
73+
i18n: 'menus.echartsDemo'
74+
},
7575
}
7676
</route>

src/pages/counter/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function add() {
2929
</button>
3030
</template>
3131

32-
<route lang="json">
32+
<route lang="json5">
3333
{
34-
"name": "counter",
35-
"meta": {
36-
"title": "🍍 持久化 Pinia 状态",
37-
"i18n": "menus.persistPiniaState"
38-
}
34+
name: 'counter',
35+
meta: {
36+
title: '🍍 持久化 Pinia 状态',
37+
i18n: 'menus.persistPiniaState'
38+
},
3939
}
4040
</route>

src/pages/forgot-password/index.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ async function getCode() {
137137
</div>
138138
</template>
139139

140-
<route lang="json">
140+
<route lang="json5">
141141
{
142-
"name": "forgot-password",
143-
"meta": {
144-
"i18n": "menus.forgot-password"
145-
}
142+
name: 'forgot-password',
143+
meta: {
144+
i18n: 'menus.forgot-password'
145+
},
146146
}
147147
</route>

src/pages/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ const menuItems = computed(() => ([
7272
</van-popup>
7373
</template>
7474

75-
<route lang="json">
75+
<route lang="json5">
7676
{
77-
"name": "home",
78-
"meta": {
79-
"title": "主页",
80-
"i18n": "menus.home"
81-
}
77+
name: 'home',
78+
meta: {
79+
title: '主页',
80+
i18n: 'menus.home'
81+
},
8282
}
8383
</route>

src/pages/keepalive/index.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const value = ref(1)
1111
<van-stepper v-model="value" />
1212
</template>
1313

14-
<route lang="json">
14+
<route lang="json5">
1515
{
16-
"name": "KeepAlive",
17-
"meta": {
18-
"title": "🧡 KeepAlive",
19-
"i18n": "menus.keepAlive",
20-
"keepAlive": true
21-
}
16+
name: 'KeepAlive',
17+
meta: {
18+
title: '🧡 KeepAlive',
19+
i18n: 'menus.keepAlive',
20+
keepAlive: true
21+
},
2222
}
2323
</route>

0 commit comments

Comments
 (0)