feat: 初始化 Astro 项目与工具链(astro5/vitest/zod3/设计token/env)
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,5 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
export default defineConfig({
|
||||
site: 'https://example.com',
|
||||
});
|
||||
Generated
+7053
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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 |
@@ -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); }
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": ["dist"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
include: ['tests/**/*.test.ts'],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user