create-admin-mvp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +175 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +159 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +41 -0
- package/templates/admin-portal/ .stylelintrc.cjs +39 -0
- package/templates/admin-portal/.dockerignore +60 -0
- package/templates/admin-portal/.env +29 -0
- package/templates/admin-portal/.env.development +41 -0
- package/templates/admin-portal/.env.example +4 -0
- package/templates/admin-portal/.env.production +41 -0
- package/templates/admin-portal/.eslintrc.cjs +45 -0
- package/templates/admin-portal/.github/workflows/ci.yml +217 -0
- package/templates/admin-portal/.husky/commit-msg +11 -0
- package/templates/admin-portal/.husky/pre-commit +10 -0
- package/templates/admin-portal/.lintstagedrc.json +13 -0
- package/templates/admin-portal/.prettierrc.cjs +19 -0
- package/templates/admin-portal/.stylelintrc.cjs +35 -0
- package/templates/admin-portal/Dockerfile +35 -0
- package/templates/admin-portal/README.md +196 -0
- package/templates/admin-portal/commitlint.config.cjs +41 -0
- package/templates/admin-portal/docker-compose.yml +35 -0
- package/templates/admin-portal/index.html +13 -0
- package/templates/admin-portal/nginx.conf +45 -0
- package/templates/admin-portal/package-lock.json +10730 -0
- package/templates/admin-portal/package.json +62 -0
- package/templates/admin-portal/playwright-report/index.html +85 -0
- package/templates/admin-portal/playwright.config.ts +73 -0
- package/templates/admin-portal/pnpm-lock.yaml +1620 -0
- package/templates/admin-portal/postcss.config.cjs +56 -0
- package/templates/admin-portal/public/vite.svg +1 -0
- package/templates/admin-portal/src/App.vue +15 -0
- package/templates/admin-portal/src/assets/styles/main.css +36 -0
- package/templates/admin-portal/src/assets/vue.svg +1 -0
- package/templates/admin-portal/src/components/HelloWorld.vue +41 -0
- package/templates/admin-portal/src/layout/index.vue +23 -0
- package/templates/admin-portal/src/main.ts +12 -0
- package/templates/admin-portal/src/mock/auth.ts +26 -0
- package/templates/admin-portal/src/permission.ts +15 -0
- package/templates/admin-portal/src/router/index.ts +21 -0
- package/templates/admin-portal/src/style.css +79 -0
- package/templates/admin-portal/src/views/About.vue +15 -0
- package/templates/admin-portal/src/views/Home.vue +15 -0
- package/templates/admin-portal/src/views/login/index.vue +34 -0
- package/templates/admin-portal/test-results/.last-run.json +23 -0
- package/templates/admin-portal/test-results/results.json +882 -0
- package/templates/admin-portal/tests/e2e/example.spec.ts +52 -0
- package/templates/admin-portal/tests/unit/example.test.ts +49 -0
- package/templates/admin-portal/tsconfig.app.json +18 -0
- package/templates/admin-portal/tsconfig.json +7 -0
- package/templates/admin-portal/tsconfig.node.json +22 -0
- package/templates/admin-portal/vite.config.ts +21 -0
- package/templates/admin-portal/vitest.config.ts +49 -0
- package/templates/admin-portal/vitest.setup.ts +60 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>admin-mvp</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# nginx.conf
|
|
2
|
+
# Nginx 配置文件
|
|
3
|
+
|
|
4
|
+
server {
|
|
5
|
+
listen 80;
|
|
6
|
+
server_name localhost;
|
|
7
|
+
|
|
8
|
+
# 启用 gzip 压缩
|
|
9
|
+
gzip on;
|
|
10
|
+
gzip_vary on;
|
|
11
|
+
gzip_min_length 1024;
|
|
12
|
+
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/javascript application/json;
|
|
13
|
+
|
|
14
|
+
# 根目录
|
|
15
|
+
root /usr/share/nginx/html;
|
|
16
|
+
index index.html;
|
|
17
|
+
|
|
18
|
+
# 静态资源缓存
|
|
19
|
+
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
20
|
+
expires 1y;
|
|
21
|
+
add_header Cache-Control "public, immutable";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
# 所有路由都返回 index.html(支持 Vue Router 的 history 模式)
|
|
25
|
+
location / {
|
|
26
|
+
try_files $uri $uri/ /index.html;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# API 代理(可选)
|
|
30
|
+
location /api {
|
|
31
|
+
proxy_pass http://api:3000;
|
|
32
|
+
proxy_http_version 1.1;
|
|
33
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
34
|
+
proxy_set_header Connection 'upgrade';
|
|
35
|
+
proxy_set_header Host $host;
|
|
36
|
+
proxy_cache_bypass $http_upgrade;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# 错误页面
|
|
40
|
+
error_page 404 /index.html;
|
|
41
|
+
error_page 500 502 503 504 /50x.html;
|
|
42
|
+
location = /50x.html {
|
|
43
|
+
root /usr/share/nginx/html;
|
|
44
|
+
}
|
|
45
|
+
}
|