-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ada5c51
Showing
207 changed files
with
16,337 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 修改配置后重启编辑器 | ||
# 配置项文档:https://editorconfig.org/ | ||
|
||
# 告知 EditorConfig 插件,当前即是根文件 | ||
root = true | ||
|
||
# 适用全部文件 | ||
[*] | ||
## 设置字符集 | ||
charset = utf-8 | ||
## 缩进风格 space | tab,建议 space(会自动继承给 Prettier) | ||
indent_style = space | ||
## 缩进的空格数(会自动继承给 Prettier) | ||
indent_size = 2 | ||
## 换行符类型 lf | cr | crlf,一般都是设置为 lf | ||
end_of_line = lf | ||
## 是否在文件末尾插入空白行 | ||
insert_final_newline = true | ||
## 是否删除一行中的前后空格 | ||
trim_trailing_whitespace = true | ||
|
||
# 适用 .md 文件 | ||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# 所有环境自定义的环境变量(命名必须以 VITE_ 开头) | ||
|
||
## 项目标题 | ||
VITE_APP_TITLE = Kops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 开发环境自定义的环境变量(命名必须以 VITE_ 开头) | ||
|
||
## 后端接口公共路径(如果解决跨域问题采用反向代理就只需写公共路径) | ||
VITE_BASE_API = '/api/v1' | ||
|
||
## 路由模式 hash 或 html5 | ||
VITE_ROUTER_HISTORY = 'hash' | ||
|
||
## 开发环境地址前缀(一般 '/','./' 都可以) | ||
VITE_PUBLIC_PATH = '/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 生产环境自定义的环境变量(命名必须以 VITE_ 开头) | ||
|
||
## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径) | ||
VITE_BASE_API = 'https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1' | ||
|
||
## 路由模式 hash 或 html5 | ||
VITE_ROUTER_HISTORY = 'hash' | ||
|
||
## 打包路径(就是网站前缀,例如部署到 https://cilliandevops.github.io/kops/ 域名下,就需要填写 /kops/) | ||
VITE_PUBLIC_PATH = '/kops/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 预发布环境自定义的环境变量(命名必须以 VITE_ 开头) | ||
|
||
## 后端接口公共路径(如果解决跨域问题采用 CORS 就需要写全路径) | ||
VITE_BASE_API = 'https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1' | ||
|
||
## 路由模式 hash 或 html5 | ||
VITE_ROUTER_HISTORY = 'hash' | ||
|
||
## 打包路径(就是网站前缀,例如部署到 https://cilliandevops.github.io/kops/ 域名下,就需要填写 /kops/) | ||
VITE_PUBLIC_PATH = '/kops/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Eslint 会忽略的文件 | ||
|
||
.DS_Store | ||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true | ||
}, | ||
extends: [ | ||
"plugin:vue/vue3-essential", | ||
"eslint:recommended", | ||
"@vue/typescript/recommended", | ||
"@vue/prettier", | ||
"@vue/eslint-config-typescript" | ||
], | ||
parser: "vue-eslint-parser", | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
jsxPragma: "React", | ||
ecmaFeatures: { | ||
jsx: true, | ||
tsx: true | ||
} | ||
}, | ||
rules: { | ||
// TS | ||
"@typescript-eslint/no-unused-expressions": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"no-debugger": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_" | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_" | ||
} | ||
], | ||
// Vue | ||
"vue/no-v-html": "off", | ||
"vue/require-default-prop": "off", | ||
"vue/require-explicit-emits": "off", | ||
"vue/multi-word-component-names": "off", | ||
"vue/html-self-closing": [ | ||
"error", | ||
{ | ||
html: { | ||
void: "always", | ||
normal: "always", | ||
component: "always" | ||
}, | ||
svg: "always", | ||
math: "always" | ||
} | ||
], | ||
// Prettier | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
endOfLine: "auto" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build And Deploy kops | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Setup Node.js 22.5.0 | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 22.5.0 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 9.5.0 | ||
|
||
- name: Build | ||
run: pnpm install && pnpm build:prod | ||
|
||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.KOPS }} | ||
BRANCH: gh-pages | ||
FOLDER: dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Git 会忽略的文件 | ||
|
||
.DS_Store | ||
node_modules | ||
dist | ||
dist-ssr | ||
.eslintcache | ||
|
||
# Local env files | ||
*.local | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
!.vscode/settings.json | ||
!.vscode/*.code-snippets | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# Use the PNPM | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# China mirror of npm | ||
# registry = https://registry.npmmirror.com | ||
|
||
# 通过该配置兜底解决组件没有类型提示的问题 | ||
shamefully-hoist = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Prettier 会忽略的文件 | ||
|
||
.DS_Store | ||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"vue.volar", | ||
"antfu.unocss", | ||
"vitest.explorer", | ||
"wiensss.region-highlighter" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"Vue3 Hook 代码结构一键生成": { | ||
"prefix": "Vue3 Hook", | ||
"body": [ | ||
"import { ref } from \"vue\"\n", | ||
"const refName1 = ref<string>(\"这是一个响应式变量\")\n", | ||
"export function useHookName() {", | ||
"\tconst refName2 = ref<string>(\"这是一个响应式变量\")\n", | ||
"\tconst fnName = () => {}\n", | ||
"\treturn { refName1, refName2, fnName }", | ||
"}", | ||
"$1" | ||
], | ||
"description": "Vue3 Hook" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"prettier.enable": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"[vue]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[html]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[css]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
"[scss]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Vue3 SFC 代码结构一键生成": { | ||
"prefix": "Vue3 SFC", | ||
"body": [ | ||
"<script lang=\"ts\" setup></script>\n", | ||
"<template>", | ||
"\t<div class=\"app-container\">...</div>", | ||
"</template>\n", | ||
"<style scoped></style>", | ||
"$1" | ||
], | ||
"description": "Vue3 SFC" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023-present cilliandevops <https://github.com/cilliandevops> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.