Skip to content

Commit

Permalink
feat: Support JSON5 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
CharleeWa committed Dec 9, 2024
1 parent 8ad8c7f commit 4245616
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 78 deletions.
6 changes: 4 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"Vue.volar",
"antfu.unocss",
"antfu.goto-alias",
"lokalise.i18n-ally",
"antfu.iconify",
"antfu.file-nesting"
"antfu.file-nesting",
"lokalise.i18n-ally",
"blueglassblock.better-json5",
"dbaeumer.vscode-eslint"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"html",
"markdown",
"json",
"json5",
"jsonc",
"yaml",
"toml",
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An mobile web apps template based on the Vue 3 ecosystem.

[文档](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)

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

[![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)

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

## Try it now

Expand Down
9 changes: 6 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An mobile web apps template based on the Vue 3 ecosystem.

[文档](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)

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

[![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)

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

## 现在可以试试

Expand Down
12 changes: 6 additions & 6 deletions src/pages/[...all].vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ function onBack() {
</div>
</template>

<route lang="json">
<route lang="json5">
{
"name": "404",
"meta": {
"title": "404",
"i18n": "menus.404Demo"
}
name: '404',
meta: {
title: '404',
i18n: 'menus.404Demo'
},
}
</route>
12 changes: 6 additions & 6 deletions src/pages/charts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ const refScoreOption = ref(scoreOption)
<Chart :option="refScoreOption" :style="{ height: '330px' }" />
</template>

<route lang="json">
<route lang="json5">
{
"name": "charts",
"meta": {
"title": "📊 Echarts 演示",
"i18n": "menus.echartsDemo"
}
name: 'charts',
meta: {
title: '📊 Echarts 演示',
i18n: 'menus.echartsDemo'
},
}
</route>
12 changes: 6 additions & 6 deletions src/pages/counter/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function add() {
</button>
</template>

<route lang="json">
<route lang="json5">
{
"name": "counter",
"meta": {
"title": "🍍 持久化 Pinia 状态",
"i18n": "menus.persistPiniaState"
}
name: 'counter',
meta: {
title: '🍍 持久化 Pinia 状态',
i18n: 'menus.persistPiniaState'
},
}
</route>
10 changes: 5 additions & 5 deletions src/pages/forgot-password/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ async function getCode() {
</div>
</template>

<route lang="json">
<route lang="json5">
{
"name": "forgot-password",
"meta": {
"i18n": "menus.forgot-password"
}
name: 'forgot-password',
meta: {
i18n: 'menus.forgot-password'
},
}
</route>
12 changes: 6 additions & 6 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ const menuItems = computed(() => ([
</van-popup>
</template>

<route lang="json">
<route lang="json5">
{
"name": "home",
"meta": {
"title": "主页",
"i18n": "menus.home"
}
name: 'home',
meta: {
title: '主页',
i18n: 'menus.home'
},
}
</route>
14 changes: 7 additions & 7 deletions src/pages/keepalive/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ const value = ref(1)
<van-stepper v-model="value" />
</template>

<route lang="json">
<route lang="json5">
{
"name": "KeepAlive",
"meta": {
"title": "🧡 KeepAlive",
"i18n": "menus.keepAlive",
"keepAlive": true
}
name: 'KeepAlive',
meta: {
title: '🧡 KeepAlive',
i18n: 'menus.keepAlive',
keepAlive: true
},
}
</route>
10 changes: 5 additions & 5 deletions src/pages/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ async function login(values: any) {
</div>
</template>

<route lang="json">
<route lang="json5">
{
"name": "login",
"meta": {
"i18n": "menus.login"
}
name: 'login',
meta: {
i18n: 'menus.login'
},
}
</route>
12 changes: 6 additions & 6 deletions src/pages/mock/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ function pull() {
</van-space>
</template>

<route lang="json">
<route lang="json5">
{
"name": "mock",
"meta": {
"title": "💿 Mock 指南",
"i18n": "menus.mockGuide"
}
name: 'mock',
meta: {
title: '💿 Mock 指南',
i18n: 'menus.mockGuide'
},
}
</route>

Expand Down
12 changes: 6 additions & 6 deletions src/pages/profile/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function login() {
</div>
</template>

<route lang="json">
<route lang="json5">
{
"name": "profile",
"meta": {
"title": "个人中心",
"i18n": "menus.profile"
}
name: 'profile',
meta: {
title: '个人中心',
i18n: 'menus.profile'
},
}
</route>
10 changes: 5 additions & 5 deletions src/pages/register/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ async function getCode() {
</div>
</template>

<route lang="json">
<route lang="json5">
{
"name": "register",
"meta": {
"i18n": "menus.register"
}
name: 'register',
meta: {
i18n: 'menus.register'
},
}
</route>
12 changes: 6 additions & 6 deletions src/pages/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ function Logout() {
}
</style>

<route lang="json">
<route lang="json5">
{
"name": "settings",
"meta": {
"title": "我的设置",
"i18n": "menus.settings"
}
name: 'settings',
meta: {
title: '我的设置',
i18n: 'menus.settings'
},
}
</route>
12 changes: 6 additions & 6 deletions src/pages/unocss/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
</button>
</template>

<route lang="json">
<route lang="json5">
{
"name": "unocss",
"meta": {
"title": "🎨 Unocss 示例",
"i18n": "menus.unocssExample"
}
name: 'unocss',
meta: {
title: '🎨 Unocss 示例',
i18n: 'menus.unocssExample'
},
}
</route>

0 comments on commit 4245616

Please sign in to comment.