Skip to content

Commit 858fab8

Browse files
committed
chore: Update .env.example and rename_package.py script
- Cleaned up .env.example by removing outdated configuration examples to simplify the template. - Enhanced rename_package.py script documentation and functionality, including improved package name detection and support for additional file types. - Updated version update script to auto-detect package directories and improve version replacement logic across relevant files.
1 parent 872fd1c commit 858fab8

25 files changed

Lines changed: 5617 additions & 407 deletions

.env.example

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,3 @@ ENVIRONMENT=development
77
# Logging Settings / 日志配置
88
LOG_LEVEL=INFO
99
LOG_FILE=logs/app.log
10-
11-
# ============================================
12-
# Add Your Own Settings Below / 在下方添加你自己的配置
13-
# ============================================
14-
# Example: Database configuration / 数据库配置示例
15-
# DATABASE_URL=sqlite:///./app.db
16-
# DATABASE_POOL_SIZE=10
17-
18-
# Example: API keys / API密钥示例
19-
# API_KEY=your-api-key-here
20-
# SECRET_KEY=your-secret-key-here
21-
22-
# Example: External services / 外部服务示例
23-
# REDIS_URL=redis://localhost:6379/0
24-
# SMTP_HOST=smtp.example.com
25-
# SMTP_PORT=587

frontend/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

frontend/components.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/styles/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}

frontend/eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { defineConfig, globalIgnores } from 'eslint/config'
7+
8+
export default defineConfig([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs.flat.recommended,
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
{
24+
files: ['src/components/ui/**/*.{ts,tsx}'],
25+
rules: {
26+
'react-refresh/only-export-components': 'off',
27+
},
28+
},
29+
])

frontend/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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="/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Python Template</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

frontend/package.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "frontend",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"preview": "vite preview",
10+
"lint": "eslint .",
11+
"typecheck": "tsc -b --noEmit",
12+
"test": "vitest run",
13+
"test:watch": "vitest"
14+
},
15+
"dependencies": {
16+
"@tailwindcss/vite": "^4.2.1",
17+
"class-variance-authority": "^0.7.1",
18+
"clsx": "^2.1.1",
19+
"lucide-react": "^0.577.0",
20+
"radix-ui": "^1.4.3",
21+
"react": "^19.2.4",
22+
"react-dom": "^19.2.4",
23+
"tailwind-merge": "^3.5.0",
24+
"tailwindcss": "^4.2.1"
25+
},
26+
"devDependencies": {
27+
"@eslint/js": "^9.39.4",
28+
"@testing-library/jest-dom": "^6.9.1",
29+
"@testing-library/react": "^16.3.2",
30+
"@testing-library/user-event": "^14.6.1",
31+
"@types/node": "^24.12.0",
32+
"@types/react": "^19.2.14",
33+
"@types/react-dom": "^19.2.3",
34+
"@vitejs/plugin-react": "^6.0.0",
35+
"eslint": "^9.39.4",
36+
"eslint-plugin-react-hooks": "^7.0.1",
37+
"eslint-plugin-react-refresh": "^0.5.2",
38+
"globals": "^17.4.0",
39+
"jsdom": "^29.0.0",
40+
"typescript": "~5.9.3",
41+
"typescript-eslint": "^8.56.1",
42+
"vite": "^8.0.0",
43+
"vitest": "^4.1.0"
44+
},
45+
"pnpm": {
46+
"overrides": {
47+
"@tailwindcss/vite>vite": "^8.0.0"
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)