feat: 初始化项目

This commit is contained in:
R524809
2026-09-02 17:47:25 +08:00
parent 04c94e75db
commit 1a2caba2b3
51 changed files with 6793 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Atlas Seller Kit</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
+25
View File
@@ -0,0 +1,25 @@
{
"name": "@atlas/web",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsc -b && vite build",
"dev": "vite",
"typecheck": "tsc -b --pretty false"
},
"dependencies": {
"antd": "6.6.2",
"axios": "1.20.0",
"react": "19.2.8",
"react-dom": "19.2.8",
"react-router-dom": "7.18.3"
},
"devDependencies": {
"@types/react": "19.2.18",
"@types/react-dom": "19.2.5",
"@vitejs/plugin-react": "6.1.1",
"typescript": "7.0.2",
"vite": "8.2.2"
}
}
+21
View File
@@ -0,0 +1,21 @@
import { App as AntdApp, ConfigProvider, Typography } from 'antd';
import { createRoot } from 'react-dom/client';
import 'antd/dist/reset.css';
function Root() {
return (
<ConfigProvider>
<AntdApp>
<main style={{ margin: '64px auto', maxWidth: 840, padding: '0 24px' }}>
<Typography.Title>Atlas Seller Kit</Typography.Title>
<Typography.Paragraph>
卖家商品工作台初始化完成。账户、平台上下文和门店模块将在此基础上实现。
</Typography.Paragraph>
</main>
</AntdApp>
</ConfigProvider>
);
}
createRoot(document.getElementById('root')!).render(<Root />);
+3
View File
@@ -0,0 +1,3 @@
/// <reference types="vite/client" />
declare module '*.css';
+12
View File
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
"noEmit": true,
"allowImportingTsExtensions": false
},
"include": ["src", "vite.config.ts"]
}
+15
View File
@@ -0,0 +1,15 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: Number(process.env.WEB_PORT ?? 8100),
proxy: {
'/api': {
target: process.env.API_ORIGIN ?? 'http://localhost:8200',
changeOrigin: true,
},
},
},
});