feat: 初始化 Astro 项目与工具链(astro5/vitest/zod3/设计token/env)

This commit is contained in:
lzy
2026-07-23 19:12:51 +08:00
parent b0cbed356a
commit 3ecac5b757
8 changed files with 7110 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
# 阿里云 OSS 发布凭据(复制为 .env 后填真值,.env 已被 .gitignore 排除)
OSS_ACCESS_KEY_ID=
OSS_ACCESS_KEY_SECRET=
OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com
OSS_BUCKET=official-site-base-demo
OSS_REGION=cn-hangzhou
# 本地 Gitea
GITEA_BASE_URL=http://localhost:3000
+5
View File
@@ -0,0 +1,5 @@
import { defineConfig } from 'astro/config';
export default defineConfig({
site: 'https://example.com',
});
+7053
View File
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
{
"name": "official-site-base",
"type": "module",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"test": "vitest run"
},
"dependencies": {
"astro": "^5.18.2",
"zod": "^3.25.76"
},
"devDependencies": {
"vitest": "^4.1.10"
}
}
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="6" fill="#007aff"/><text x="16" y="22" font-size="18" text-anchor="middle" fill="#fff" font-family="sans-serif">O</text></svg>

After

Width:  |  Height:  |  Size: 220 B

+11
View File
@@ -0,0 +1,11 @@
:root {
/* 白标入口:换客户时改这里 */
--color-primary: #007aff;
--color-text: #1a1a1a;
--color-bg: #ffffff;
--font-sans: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
html { font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); }
body { margin: 0; max-width: 960px; margin-inline: auto; padding: 1.5rem; }
a { color: var(--color-primary); }
+5
View File
@@ -0,0 +1,5 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
+7
View File
@@ -0,0 +1,7 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['tests/**/*.test.ts'],
},
});