Skip to content

Commit

Permalink
feat: 🎉 添加新的文章并更新依赖版本
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Feb 20, 2024
1 parent 2826891 commit c3e9242
Show file tree
Hide file tree
Showing 30 changed files with 153 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: docs
folder: dist
folder: dist
36 changes: 28 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": true,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
},
"eslint.format.enable": true,
"eslint.codeAction.showDocumentation": {
"enable": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
// "jsonc",
"javascript",
"javascriptreact",
"typescript",
Expand All @@ -18,6 +36,8 @@
"html",
"markdown",
"json",
"yaml"
"jsonc",
"yaml",
"toml"
]
}
8 changes: 0 additions & 8 deletions .vscode/viarotel.github.io.code-workspace

This file was deleted.

30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import antfu from '@antfu/eslint-config'

export default antfu({
typescript: false,
markdown: false,
ignores: [
'node_modules',
'src/notes/public',
'dist',
'index.html',
],
}, {
rules: {
'jsdoc/check-param-names': 'off',
'jsdoc/check-types': 'off',
'jsdoc/require-returns-description': 'off',

'node/prefer-global/process': 'off',

'no-console': 'off',
'curly': 'off',
'eqeqeq': 'off',
'no-unused-vars': 'off',

'unused-imports/no-unused-vars': 'off',

'vue/html-self-closing': 'off',
'vue/block-order': 'off',
},
})
32 changes: 14 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,35 @@
"type": "module",
"version": "1.6.2",
"packageManager": "[email protected]",
"description": "viarotel-site",
"description": "Viarotel site",
"author": "viarotel",
"license": "ISC",
"keywords": [],
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview",
"lint": "pnpm run lint:js",
"lint:js": "eslint . .vitepress --ext .vue,.js,.ts,.jsx,.tsx,.json --ignore-path .eslintignore --fix"
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@lottiefiles/lottie-player": "^1.7.1",
"@waline/client": "^2.15.7",
"@waline/client": "^3.1.1",
"dayjs": "^1.11.7",
"ga-gtag": "^1.1.7",
"gsap": "^3.11.5",
"load-js": "^3.1.1",
"load-script": "^2.0.0",
"lodash-es": "^4.17.21",
"ofetch": "^1.0.1",
"pathe": "^1.1.0",
"qs": "^6.11.1"
"ofetch": "^1.0.1"
},
"devDependencies": {
"@viarotel-org/eslint-config": "^0.5.10",
"@viarotel-org/unocss-config": "^0.5.9",
"eslint": "^8.48.0",
"typescript": "^5.2.2",
"unocss": "^0.53.5",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-remove-console": "^2.1.1",
"vitepress": "1.0.0-rc.22",
"vitepress-sidebar": "^1.18.0"
"@antfu/eslint-config": "^2.6.4",
"@unocss/preset-wind": "^0.58.5",
"@unocss/transformer-directives": "^0.58.5",
"eslint": "^8.56.0",
"typescript": "^5.3.3",
"unocss": "^0.58.5",
"vite-plugin-remove-console": "^2.2.0",
"vitepress": "1.0.0-rc.44",
"vitepress-sidebar": "^1.18.6"
}
}
2 changes: 1 addition & 1 deletion src/assets/lotties/cat.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/dog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/giraffe.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/magical-girl.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/note.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/pencil.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/walle.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/assets/lotties/write.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/HomeHeroImage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ViaLottiePlayer from '@/components/ViaLottiePlayer/index.vue'
const { lang } = useData()
const lotties = import.meta.globEager('@/assets/lotties/*.json')
const lotties = import.meta.glob('@/assets/lotties/*.json', { eager: true })
// console.log('lotties', lotties)
const arrayLotties = Object.entries(lotties).map((item, index) => [
Expand Down
2 changes: 1 addition & 1 deletion src/notes/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
import ViaCrowd from '@/components/ViaCrowd/index.vue'
</script>

<ViaCrowd class=""/>
<ViaCrowd class=""/>
2 changes: 1 addition & 1 deletion src/notes/bookmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@

[LuLu UI | 原生 JS 兼容 IE 的 UI 组件库](https://l-ui.com/)

[Axios CN |  可以用于浏览器和 node.js 的网络请求库](https://axios-http.com/zh/docs/intro)
[Axios CN | 可以用于浏览器和 node.js 的网络请求库](https://axios-http.com/zh/docs/intro)

[容联七陌 | 智能客服集成解决方案](https://www.7moor.com/developer)

Expand Down
2 changes: 1 addition & 1 deletion src/notes/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ hero:
- theme: alt
text: Contact me
link: /en/contact
---
---
2 changes: 1 addition & 1 deletion src/notes/en/memo/index.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Time flies, only words remain. Even if the world changes dramatically, it still remembers you.
Time flies, only words remain. Even if the world changes dramatically, it still remembers you.
2 changes: 1 addition & 1 deletion src/notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ hero:
- theme: alt
text: 联系我
link: /contact
---
---
2 changes: 1 addition & 1 deletion src/notes/memo/apple/homebrew.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ git -C "$(brew --repository)" remote -v
brew tap-info homebrew/bundle
brew tap-info homebrew/cask
brew tap-info homebrew/services
```
```
2 changes: 1 addition & 1 deletion src/notes/memo/git/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
```yml
[http]
proxy = http://127.0.0.1:7890
```
```
19 changes: 19 additions & 0 deletions src/notes/memo/git/upload-executable-permission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Git 上传可执行程序权限问题

## 单个

```bash
git update-index --chmod=+x "electron/resources/extra/adb.exe"
```

## 批量

```bash
find "electron/resources/extra" -type f -exec git update-index --chmod=+x {} +
```

## 查看权限

```bash
git ls-files --stage
```
2 changes: 1 addition & 1 deletion src/notes/memo/index.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
流年易逝,惟有文字,即使沧海桑田,它依然铭记你。
流年易逝,惟有文字,即使沧海桑田,它依然铭记你。
3 changes: 3 additions & 0 deletions src/notes/memo/microsoft/developer-register.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 解决微软开发者注册无法通过

state/province 输入城市首母缩写,比如上海,写成 sh 。 其它选项正常填写准确的即可,中英文都行。然后就不会有这个提示了,这个问题有人反馈过,用这个方法就可以成功。 专门针对这个 2201 错误。
5 changes: 5 additions & 0 deletions src/notes/memo/microsoft/ms-gamingoverlay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Windows 提示 无法打开此 ms-gamingoverlay 链接

```powershell
REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR " /v AppCaptureEnabled /t REG_DWORD /d 0 /f
```
15 changes: 15 additions & 0 deletions src/notes/memo/node/execution-path-space.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 在 Node.js 中使用 child_process.exec 或 child_process.spawn 执行包含空格的程序路径

使用 `""` 包裹可执行文件路径

```js
const { exec } = require('child_process')
exec(
'C:/Program Files/myApp.exe'
// ...
)
spawn(
'C:/Program Files/myApp.exe'
// ...
)
```
2 changes: 1 addition & 1 deletion src/notes/memo/via/parsec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ app_proxy = 1
app_proxy_address = 127.0.0.1
app_proxy_port = 7890
app_proxy_scheme = http
```
```
4 changes: 2 additions & 2 deletions src/styles/rainbow.css
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,11 @@
--vp-c-brand-dark: #008269;
--vp-c-brand-darker: #005d47;
--vp-c-brand-next: #009ff7;
animation: rainbow 40s linear infinite;
/* animation: rainbow 40s linear infinite; */
}

@media (prefers-reduced-motion: reduce) {
:root {
animation: none !important;
}
}
}
27 changes: 17 additions & 10 deletions uno.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
// import { defineConfig } from "unocss";
import extendConfig from '@viarotel-org/unocss-config'
import { defineConfig } from 'unocss'
import presetWind from '@unocss/preset-wind'
import transformerDirectives from '@unocss/transformer-directives'

const primary = {
DEFAULT: '#0464bb',
}
const presets = [
presetWind(),
]

export default extendConfig({
export default defineConfig({
presets,
transformers: [transformerDirectives()],
safelist: ['hover:opacity-100', 'opacity-70', 'duration-500'],
theme: {
colors: {
primary,
},
colors: {},
},
shortcuts: {
'inset-0': 'top-0 bottom-0 left-0 right-0',
'inset-center':
'absolute top-1/2 left-1/2 transform -translate-y-1/2 -translate-x-1/2',
'inset-x-center': 'absolute left-1/2 transform -translate-x-1/2',
'inset-y-center': 'absolute top-1/2 transform -translate-y-1/2',
},
shortcuts: {},
})
3 changes: 1 addition & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import path from 'node:path'
import useRemoveConsole from 'vite-plugin-remove-console'
import useEslint from 'vite-plugin-eslint'
import useUnoCSS from 'unocss/vite'
import rewrites from './src/rewrites/index.js'
import { proxyPort } from './src/configs/index.js'

export default {
plugins: [useRemoveConsole(), useEslint({ fix: true }), useUnoCSS()],
plugins: [useRemoveConsole(), useUnoCSS()],
resolve: {
alias: {
...rewrites,
Expand Down

0 comments on commit c3e9242

Please sign in to comment.