Skip to content

Commit

Permalink
style: introduce prettier and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 6, 2023
1 parent 6743f4f commit ad9b3b7
Show file tree
Hide file tree
Showing 13 changed files with 154 additions and 147 deletions.
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
# Node modules
**/node_modules/**

# Build files
docs-shared/lib/
packages/*/lib/

# Vuepress Cache
**/.vuepress/.cache/**
# Vuepress Temp
**/.vuepress/.temp/**
# Vuepress Output
#dist/
**/.vuepress/dist/

# npm config
.npmrc

# Typescript build info
*.tsbuildinfo

# Coverage Files
coverage/

# macOS
.DS_Store
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Node modules
**/node_modules/**

# Vuepress Cache
**/.vuepress/.cache/**
# Vuepress Temp
**/.vuepress/.temp/**
# Vuepress Output
**/.vuepress/dist/
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"docs:build": "vuepress build src",
"docs:clean-dev": "vuepress dev src --clean-cache",
"docs:dev": "vuepress dev src",
"docs:lint": "prettier --check --write src",
"docs:update-package": "npx vp-update"
},
"packageManager": "[email protected]",
Expand All @@ -19,5 +20,8 @@
"vue": "^3.3.10",
"vuepress": "2.0.0-rc.0",
"vuepress-theme-hope": "2.0.0-rc.2"
},
"dependencies": {
"prettier": "^3.1.0"
}
}
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions src/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { viteBundler } from "@vuepress/bundler-vite";
import { path } from "@vuepress/utils";
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";
import { viteBundler } from '@vuepress/bundler-vite'
import { path } from '@vuepress/utils'
import { defineUserConfig } from 'vuepress'
import theme from './theme.js'

export default defineUserConfig({
base: "/",
base: '/',

locales: {
"/": {
lang: "en-US",
title: "ZLMediaKit",
description: "Official documentation for ZLMediaKit",
'/': {
lang: 'en-US',
title: 'ZLMediaKit',
description: 'Official documentation for ZLMediaKit',
},
"/zh/": {
lang: "zh-CN",
title: "ZLMediaKit",
description: "ZLMediaKit 官方文档",
'/zh/': {
lang: 'zh-CN',
title: 'ZLMediaKit',
description: 'ZLMediaKit 官方文档',
},
},

Expand All @@ -30,4 +30,4 @@ export default defineUserConfig({
theme,

shouldPrefetch: false,
});
})
46 changes: 23 additions & 23 deletions src/.vuepress/navbar/en.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import {navbar} from "vuepress-theme-hope";
import { navbar } from 'vuepress-theme-hope'

export const enNavbar = navbar([
"/",
"/guide/",
"/tutorial/",
{
text: "Reference",
icon: "lightbulb",
prefix: "/reference/",
children: ["test",
"resources",
"documents",
"development_log"
],
},
{
text: "More",
icon: "lightbulb",
prefix: "/more/",
children: [
"collaborative_projects", 'license', 'thanks', "contact", "use_cases"
],
},
]);
'/',
'/guide/',
'/tutorial/',
{
text: 'Reference',
icon: 'lightbulb',
prefix: '/reference/',
children: ['test', 'resources', 'documents', 'development_log'],
},
{
text: 'More',
icon: 'lightbulb',
prefix: '/more/',
children: [
'collaborative_projects',
'license',
'thanks',
'contact',
'use_cases',
],
},
])
4 changes: 2 additions & 2 deletions src/.vuepress/navbar/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./en.js";
export * from "./zh.js";
export * from './en.js'
export * from './zh.js'
45 changes: 23 additions & 22 deletions src/.vuepress/navbar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import {navbar} from "vuepress-theme-hope";
import { navbar } from 'vuepress-theme-hope'

export const zhNavbar = navbar([
"/zh/",
"/zh/guide/",
"/zh/tutorial/",
{
text: "参考",
icon: "lightbulb",
prefix: "/zh/reference/",
children: ["test",
"resources",
"documents", "development_log"
],
},
{
text: "了解更多",
icon: "laptop-code",
prefix: "/zh/more/",
children: [
"collaborative_projects", 'license', 'thanks', "contact", "use_cases"
],
},
]);
'/zh/',
'/zh/guide/',
'/zh/tutorial/',
{
text: '参考',
icon: 'lightbulb',
prefix: '/zh/reference/',
children: ['test', 'resources', 'documents', 'development_log'],
},
{
text: '了解更多',
icon: 'laptop-code',
prefix: '/zh/more/',
children: [
'collaborative_projects',
'license',
'thanks',
'contact',
'use_cases',
],
},
])
51 changes: 26 additions & 25 deletions src/.vuepress/sidebar/en.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import {sidebar} from "vuepress-theme-hope";
import { sidebar } from 'vuepress-theme-hope'

export const enSidebar = sidebar({
"/": [
"",
"tutorial/",
{
text: "Docs",
icon: "book",
prefix: "guide/",
children: "structure",
}, {
text: "Reference",
icon: "laptop-code",
prefix: "reference/",
link: "reference/",
children: "structure",
},
{
text: "More",
icon: "laptop-code",
prefix: "more/",
link: "more/",
children: "structure",
},
],
});
'/': [
'',
'tutorial/',
{
text: 'Docs',
icon: 'book',
prefix: 'guide/',
children: 'structure',
},
{
text: 'Reference',
icon: 'laptop-code',
prefix: 'reference/',
link: 'reference/',
children: 'structure',
},
{
text: 'More',
icon: 'laptop-code',
prefix: 'more/',
link: 'more/',
children: 'structure',
},
],
})
4 changes: 2 additions & 2 deletions src/.vuepress/sidebar/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./en.js";
export * from "./zh.js";
export * from './en.js'
export * from './zh.js'
51 changes: 26 additions & 25 deletions src/.vuepress/sidebar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import {sidebar} from "vuepress-theme-hope";
import { sidebar } from 'vuepress-theme-hope'

export const zhSidebar = sidebar({
"/zh/": [
"",
"tutorial/",
{
text: "指南",
icon: "book",
prefix: "guide/",
children: "structure",
}, {
text: "参考",
icon: "laptop-code",
prefix: "reference/",
link: "reference/",
children: "structure",
},
{
text: "了解更多",
icon: "laptop-code",
prefix: "more/",
link: "more/",
children: "structure",
},
],
});
'/zh/': [
'',
'tutorial/',
{
text: '指南',
icon: 'book',
prefix: 'guide/',
children: 'structure',
},
{
text: '参考',
icon: 'laptop-code',
prefix: 'reference/',
link: 'reference/',
children: 'structure',
},
{
text: '了解更多',
icon: 'laptop-code',
prefix: 'more/',
link: 'more/',
children: 'structure',
},
],
})
9 changes: 5 additions & 4 deletions src/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.vp-hero-info-wrapper {
width:100vw;
width: 100vw;
background: url(/assets/image/bg.svg) center/cover no-repeat;
}

@media (min-width: 768px) {
.vp-hero-info-wrapper {
height:100vh
}
.vp-hero-info-wrapper {
height: 100vh;
}
}
Loading

0 comments on commit ad9b3b7

Please sign in to comment.