create-dwy 0.9.0 → 0.9.1
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/package.json
CHANGED
package/src/utils.js
CHANGED
|
@@ -38,6 +38,10 @@ export async function renderTemplate(templateDir, destDir, context) {
|
|
|
38
38
|
destName = Handlebars.compile(destName)(context)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
if (destName.startsWith('_')) {
|
|
42
|
+
destName = '.' + destName.slice(1)
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
if (entry.isDirectory()) {
|
|
42
46
|
const destPath = path.join(destDir, destName)
|
|
43
47
|
await fs.ensureDir(destPath)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# {{projectName}} — 环境变量样例
|
|
3
|
+
# ============================================================
|
|
4
|
+
# 复制为 .env 并填入真实值。.env 已 gitignored。
|
|
5
|
+
# 端口前缀策略:本项目用 {{portPrefix}}xxxx 万位前缀避免与其他项目冲突。
|
|
6
|
+
|
|
7
|
+
# ── 基础 ──
|
|
8
|
+
ENVIRONMENT=dev
|
|
9
|
+
SECRET_KEY=change-me-in-production
|
|
10
|
+
|
|
11
|
+
# ── PostgreSQL ──
|
|
12
|
+
# docker-compose.dev.yml 默认本地端口:127.0.0.1:{{portPrefix}}5432
|
|
13
|
+
POSTGRES_DB={{projectName}}
|
|
14
|
+
POSTGRES_USER=postgres
|
|
15
|
+
POSTGRES_PASSWORD=postgres
|
|
16
|
+
DATABASE_URL=postgresql+asyncpg://postgres:postgres@127.0.0.1:{{portPrefix}}5432/{{projectName}}
|
|
17
|
+
|
|
18
|
+
# ── Redis ──
|
|
19
|
+
# docker-compose.dev.yml 默认本地端口:127.0.0.1:{{portPrefix}}6379
|
|
20
|
+
REDIS_URL=redis://127.0.0.1:{{portPrefix}}6379/0
|
|
21
|
+
|
|
22
|
+
# ── 服务端口(dev.sh 读取) ──
|
|
23
|
+
BACKEND_PORT={{portPrefix}}8001
|
|
24
|
+
FRONTEND_PORT={{portPrefix}}5173
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Env
|
|
2
|
+
.env
|
|
3
|
+
*.env
|
|
4
|
+
.env.*
|
|
5
|
+
|
|
6
|
+
# Python
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.pyc
|
|
9
|
+
*.pyo
|
|
10
|
+
.venv/
|
|
11
|
+
*.egg-info/
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
htmlcov/
|
|
17
|
+
*.coverage
|
|
18
|
+
|
|
19
|
+
# Node
|
|
20
|
+
node_modules/
|
|
21
|
+
.pnpm-store/
|
|
22
|
+
*.log
|
|
23
|
+
|
|
24
|
+
# Databases / artifacts
|
|
25
|
+
*.sqlite
|
|
26
|
+
*.sqlite3
|
|
27
|
+
*.db
|
|
28
|
+
*.dump
|
|
29
|
+
|
|
30
|
+
# IDE
|
|
31
|
+
.idea/
|
|
32
|
+
.vscode/
|
|
33
|
+
*.iml
|
|
34
|
+
|
|
35
|
+
# OS
|
|
36
|
+
.DS_Store
|
|
37
|
+
Thumbs.db
|