Skip to content

Commit f4b5150

Browse files
committed
feat: add pure-admin-thin
1 parent 7067396 commit f4b5150

File tree

127 files changed

+11709
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+11709
-2
lines changed

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false

.env

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# port
2+
VITE_PORT = 8848
3+
# title
4+
VITE_TITLE = vue-pure-admin
5+
# version
6+
VITE_VERSION = 2.1.0
7+
# open
8+
VITE_OPEN = false
9+
10+
# public path
11+
VITE_PUBLIC_PATH = /
12+
13+
# Cross-domain proxy, you can configure multiple
14+
VITE_PROXY = [ ["/api", "http://127.0.0.1:3000" ] ]

.env.development

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# port
2+
VITE_PORT = 8848
3+
# title
4+
VITE_TITLE = vue-pure-admin
5+
# version
6+
VITE_VERSION = 2.1.0
7+
# open
8+
VITE_OPEN = false
9+
10+
# public path
11+
VITE_PUBLIC_PATH = /
12+
13+
# Cross-domain proxy, you can configure multiple
14+
VITE_PROXY = [ ["/api", "http://127.0.0.1:3000" ] ]

.env.production

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# public path
2+
VITE_PUBLIC_PATH = /manages/

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
public
2+
dist
3+
*.d.ts
4+
package.json

.eslintrc.js

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
globals: {
7+
// Ref sugar (take 2)
8+
$: "readonly",
9+
$$: "readonly",
10+
$ref: "readonly",
11+
$shallowRef: "readonly",
12+
$computed: "readonly",
13+
14+
// index.d.ts
15+
// global.d.ts
16+
Fn: "readonly",
17+
PromiseFn: "readonly",
18+
RefType: "readonly",
19+
LabelValueOptions: "readonly",
20+
EmitType: "readonly",
21+
TargetContext: "readonly",
22+
ComponentElRef: "readonly",
23+
ComponentRef: "readonly",
24+
ElRef: "readonly",
25+
global: "readonly",
26+
ForDataType: "readonly",
27+
ComponentRoutes: "readonly",
28+
29+
// script setup
30+
defineProps: "readonly",
31+
defineEmits: "readonly",
32+
defineExpose: "readonly",
33+
withDefaults: "readonly"
34+
},
35+
extends: [
36+
"plugin:vue/vue3-essential",
37+
"eslint:recommended",
38+
"@vue/typescript/recommended",
39+
"@vue/prettier",
40+
"@vue/prettier/@typescript-eslint"
41+
],
42+
parser: "vue-eslint-parser",
43+
parserOptions: {
44+
parser: "@typescript-eslint/parser",
45+
ecmaVersion: 2020,
46+
sourceType: "module",
47+
jsxPragma: "React",
48+
ecmaFeatures: {
49+
jsx: true
50+
}
51+
},
52+
rules: {
53+
"@typescript-eslint/no-explicit-any": "off", // any
54+
"no-debugger": "off",
55+
"@typescript-eslint/explicit-module-boundary-types": "off", // setup()
56+
"@typescript-eslint/ban-types": "off",
57+
"@typescript-eslint/ban-ts-comment": "off",
58+
"@typescript-eslint/no-empty-function": "off",
59+
"@typescript-eslint/no-non-null-assertion": "off",
60+
"@typescript-eslint/no-unused-vars": [
61+
"error",
62+
{
63+
argsIgnorePattern: "^_",
64+
varsIgnorePattern: "^_"
65+
}
66+
],
67+
"no-unused-vars": [
68+
"error",
69+
{
70+
argsIgnorePattern: "^_",
71+
varsIgnorePattern: "^_"
72+
}
73+
]
74+
}
75+
};

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
.eslintcache
7+
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
tests/**/coverage/
12+
13+
# Editor directories and files
14+
.idea
15+
*.suo
16+
*.ntvs*
17+
*.njsproj
18+
*.sln

.husky/commit-msg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=./_/husky.sh
4+
. "$(dirname "$0")/_/husky.sh"
5+
6+
npx --no-install commitlint --edit "$1"

.husky/common.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
command_exists () {
3+
command -v "$1" >/dev/null 2>&1
4+
}
5+
6+
# Workaround for Windows 10, Git Bash and Yarn
7+
if command_exists winpty && test -t 1; then
8+
exec < /dev/tty
9+
fi

.husky/lintstagedrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
3+
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
4+
"prettier --write--parser json"
5+
],
6+
"package.json": ["prettier --write"],
7+
"*.vue": ["eslint --fix", "prettier --write", "stylelint --fix"],
8+
"*.{vue,css,scss,postcss,less}": ["stylelint --fix", "prettier --write"],
9+
"*.md": ["prettier --write"]
10+
};

.husky/pre-commit

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
. "$(dirname "$0")/common.sh"
4+
5+
[ -n "$CI" ] && exit 0
6+
7+
# Format and submit code according to lintstagedrc.js configuration
8+
npm run lint:lint-staged
9+
10+
npm run lint:pretty

.prettierrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
jsxBracketSameLine: true,
4+
singleQuote: false,
5+
arrowParens: "avoid",
6+
trailingComma: "none"
7+
};

.stylelintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist/*
2+
/public/*
3+
public/*

README.en-US.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>vue-pure-admin精简版</h1>

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# pure-admin-thin
2-
vue-pure-admin精简版
1+
<h1>vue-pure-admin精简版</h1>

api/routes.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { http } from "/@/utils/http";
2+
3+
export const getAsyncRoutes = (data?: object) => {
4+
return http.request("get", "/getAsyncRoutes", data);
5+
};

babel.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const productPlugins = [];
2+
process.env.NODE_ENV === "production" &&
3+
productPlugins.push("transform-remove-console");
4+
module.exports = {
5+
plugins: [...productPlugins]
6+
};

build/proxy.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type ProxyItem = [string, string];
2+
3+
type ProxyList = ProxyItem[];
4+
5+
const regExps = (value: string, reg: string): string => {
6+
return value.replace(new RegExp(reg, "g"), "");
7+
};
8+
9+
export function createProxy(list: ProxyList = []) {
10+
const ret: any = {};
11+
for (const [prefix, target] of list) {
12+
ret[prefix] = {
13+
target: target,
14+
changeOrigin: true,
15+
rewrite: (path: string) => regExps(path, prefix)
16+
};
17+
}
18+
return ret;
19+
}

build/utils.ts

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const warpperEnv = (envConf: Recordable): ViteEnv => {
2+
const ret: any = {};
3+
4+
for (const envName of Object.keys(envConf)) {
5+
let realName = envConf[envName].replace(/\\n/g, "\n");
6+
realName =
7+
realName === "true" ? true : realName === "false" ? false : realName;
8+
9+
if (envName === "VITE_PORT") {
10+
realName = Number(realName);
11+
}
12+
if (envName === "VITE_PROXY" && realName) {
13+
try {
14+
realName = JSON.parse(realName.replace(/'/g, '"'));
15+
} catch (error) {
16+
realName = "";
17+
}
18+
}
19+
ret[envName] = realName;
20+
if (typeof realName === "string") {
21+
process.env[envName] = realName;
22+
} else if (typeof realName === "object") {
23+
process.env[envName] = JSON.stringify(realName);
24+
}
25+
}
26+
return ret;
27+
};
28+
const loadEnv = (): ViteEnv => {
29+
return import.meta.env;
30+
};
31+
32+
export { loadEnv, warpperEnv };

commitlint.config.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
ignores: [commit => commit.includes("init")],
3+
extends: ["@commitlint/config-conventional"],
4+
rules: {
5+
"body-leading-blank": [2, "always"],
6+
"footer-leading-blank": [1, "always"],
7+
"header-max-length": [2, "always", 108],
8+
"subject-empty": [2, "never"],
9+
"type-empty": [2, "never"],
10+
"type-enum": [
11+
2,
12+
"always",
13+
[
14+
"feat",
15+
"fix",
16+
"perf",
17+
"style",
18+
"docs",
19+
"test",
20+
"refactor",
21+
"build",
22+
"ci",
23+
"chore",
24+
"revert",
25+
"wip",
26+
"workflow",
27+
"types",
28+
"release"
29+
]
30+
]
31+
}
32+
};

index.html

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<link rel="stylesheet" href="/iconfont.css" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>Pure-Admin-Thin</title>
9+
<script>
10+
window.process = {};
11+
</script>
12+
</head>
13+
14+
<body>
15+
<div id="app">
16+
<style>
17+
* {
18+
margin: 0;
19+
padding: 0;
20+
}
21+
22+
html,
23+
body {
24+
width: 100%;
25+
height: 100%;
26+
display: flex;
27+
justify-content: center;
28+
align-items: center;
29+
background: #000;
30+
overflow: hidden;
31+
font-family: "Reggae One", cursive;
32+
}
33+
34+
p {
35+
font-size: 8vw;
36+
overflow: hidden;
37+
-webkit-text-stroke: 3px #7272a5;
38+
}
39+
40+
span {
41+
display: block;
42+
font-size: 20px;
43+
overflow: hidden;
44+
color: green;
45+
text-align: center;
46+
}
47+
48+
p::before {
49+
content: " ";
50+
width: 100%;
51+
height: 100%;
52+
position: absolute;
53+
left: 0;
54+
top: 0;
55+
background-image: linear-gradient(45deg, #ff269b, #2ab5f5, #ffbf00);
56+
mix-blend-mode: multiply;
57+
}
58+
59+
p::after {
60+
content: "";
61+
background: radial-gradient(circle, #fff, #000 50%);
62+
background-size: 25% 25%;
63+
position: absolute;
64+
top: -100%;
65+
left: -100%;
66+
right: 0;
67+
bottom: 0;
68+
mix-blend-mode: color-dodge;
69+
animation: mix 2s linear infinite;
70+
}
71+
72+
@keyframes mix {
73+
to {
74+
transform: translate(50%, 50%);
75+
}
76+
}
77+
</style>
78+
<div class="g-container">
79+
<p>Pure-Admin</p>
80+
</div>
81+
</div>
82+
<script type="module" src="/src/main.ts"></script>
83+
</body>
84+
</html>

0 commit comments

Comments
 (0)