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.
Files changed (3) hide show
  1. package/README +0 -0
  2. package/package.json +1 -1
  3. package/src/scaffold.js +33 -28
package/README ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-epinoetics-app",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Scaffold a new project from your boilerplate repos",
5
5
  "type": "module",
6
6
  "bin": {
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, selected, backendId, frontendId }) {
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 repoLines = selected
26
- .map(r => `| \`code/${r.id}\` | ${r.label} | ${r.url} |`)
27
- .join('\n');
25
+ const nestSection = backendId === 'api-nest' ? `
26
+ ## NestJS backend
28
27
 
29
- const hasFrontend = !!frontendId;
28
+ - **Database**: ${database.label}
29
+ - **Features**: ${features.length ? features.map(f => f.label).join(', ') : 'none'}
30
30
 
31
- const readme = `# ${projectName}
31
+ \`\`\`bash
32
+ cd code/api-nest
33
+ # follow README inside
34
+ \`\`\`
35
+ ` : '';
32
36
 
33
- > Scaffolded with \`create-myapp\`
37
+ const repoLines = plainRepos.map(r =>
38
+ `| \`code/${r.id}\` | ${r.label} | ${r.url} |`
39
+ ).join('\n');
34
40
 
35
- ## Structure
36
-
37
- \`\`\`
38
- ${projectName}/
39
- └── code/
40
- ${selected.map(r => ` ├── ${r.id}/`).join('\n')}
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
- ## Getting started
56
+ const readme = `# ${projectName}
50
57
 
51
- Each piece is self-contained. Navigate into a folder and follow its own README:
58
+ > Scaffolded with \`create-epinoetics-app\`
52
59
 
53
- \`\`\`bash
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
+ }