create-epinoetics-app 1.0.1 → 1.0.2
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/README +0 -0
- package/package.json +1 -1
- package/src/scaffold.js +33 -28
package/README
ADDED
|
File without changes
|
package/package.json
CHANGED
package/src/scaffold.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join, resolve } from 'path';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
|
|
4
|
-
export async function writeRootFiles({ projectName,
|
|
4
|
+
export async function writeRootFiles({ projectName, plainRepos = [], backendId, database, features = [], frontendId }) {
|
|
5
5
|
const projectDir = resolve(process.cwd(), projectName);
|
|
6
6
|
|
|
7
7
|
// ── .gitignore ────────────────────────────────────────────────────
|
|
@@ -22,48 +22,53 @@ export async function writeRootFiles({ projectName, selected, backendId, fronten
|
|
|
22
22
|
fs.writeFileSync(join(projectDir, '.gitignore'), gitignore, 'utf8');
|
|
23
23
|
|
|
24
24
|
// ── README.md ─────────────────────────────────────────────────────
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
.join('\n');
|
|
25
|
+
const nestSection = backendId === 'api-nest' ? `
|
|
26
|
+
## NestJS backend
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
- **Database**: ${database.label}
|
|
29
|
+
- **Features**: ${features.length ? features.map(f => f.label).join(', ') : 'none'}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
\`\`\`bash
|
|
32
|
+
cd code/api-nest
|
|
33
|
+
# follow README inside
|
|
34
|
+
\`\`\`
|
|
35
|
+
` : '';
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
const repoLines = plainRepos.map(r =>
|
|
38
|
+
`| \`code/${r.id}\` | ${r.label} | ${r.url} |`
|
|
39
|
+
).join('\n');
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
\`\`\`
|
|
41
|
+
const structureLines = [
|
|
42
|
+
backendId === 'api-nest' ? ' ├── api-nest/ ← NestJS' : null,
|
|
43
|
+
backendId === 'api-dotnet' ? ' ├── api-dotnet/ ← .NET Microservices' : null,
|
|
44
|
+
' ├── dashboard/ ← Angular admin panel',
|
|
45
|
+
frontendId ? ` ├── ${frontendId}/` : null,
|
|
46
|
+
].filter(Boolean).join('\n');
|
|
42
47
|
|
|
48
|
+
const repoTableSection = plainRepos.length > 0 ? `
|
|
43
49
|
## Repos
|
|
44
50
|
|
|
45
51
|
| Folder | Name | Source |
|
|
46
52
|
|--------|------|--------|
|
|
47
53
|
${repoLines}
|
|
54
|
+
` : '';
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
const readme = `# ${projectName}
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
> Scaffolded with \`create-epinoetics-app\`
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
# Backend
|
|
55
|
-
cd code/${backendId}
|
|
56
|
-
# follow README inside
|
|
60
|
+
## Structure
|
|
57
61
|
|
|
58
|
-
# Dashboard
|
|
59
|
-
cd code/dashboard
|
|
60
|
-
# follow README inside
|
|
61
|
-
${hasFrontend ? `
|
|
62
|
-
# Frontend
|
|
63
|
-
cd code/${frontendId}
|
|
64
|
-
# follow README inside` : ''}
|
|
65
62
|
\`\`\`
|
|
63
|
+
${projectName}/
|
|
64
|
+
└── code/
|
|
65
|
+
${structureLines}
|
|
66
|
+
\`\`\`
|
|
67
|
+
${nestSection}${repoTableSection}
|
|
68
|
+
## Getting started
|
|
69
|
+
|
|
70
|
+
Each piece is self-contained — navigate into a folder and follow its own README.
|
|
66
71
|
`;
|
|
67
72
|
|
|
68
73
|
fs.writeFileSync(join(projectDir, 'README.md'), readme, 'utf8');
|
|
69
|
-
}
|
|
74
|
+
}
|