initkit 1.1.0 ā 1.2.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/README.md +109 -117
- package/package.json +2 -5
- package/src/cli.js +77 -34
- package/src/commands/create.js +173 -84
- package/src/prompts/questions.js +95 -39
- package/src/utils/addonInstaller.js +402 -0
- package/src/utils/cliRunner.js +146 -0
- package/src/utils/frameworkBootstrap.js +304 -0
- package/src/utils/templateGenerator.js +191 -171
- package/src/templates/express.js +0 -915
- package/src/templates/fullstack.js +0 -1236
- package/src/templates/nextjs.js +0 -620
- package/src/templates/react.js +0 -586
- package/src/templates/vue.js +0 -545
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Built with ES Modules | TypeScript Ready | Zero Config Required | Fully Document
|
|
|
23
23
|
|
|
24
24
|

|
|
25
25
|
|
|
26
|
-
_Creating a
|
|
26
|
+
_Creating a production-ready React application with InitKit_
|
|
27
27
|
|
|
28
28
|
</div>
|
|
29
29
|
|
|
@@ -35,11 +35,11 @@ InitKit eliminates the tedious project setup process by providing intelligent sc
|
|
|
35
35
|
|
|
36
36
|
**Key Benefits:**
|
|
37
37
|
|
|
38
|
-
- **
|
|
38
|
+
- **CLI-First Architecture** - Uses official framework CLIs (create-next-app, create-vite, create-vue, express-generator)
|
|
39
39
|
- **Smart Validation** - Real-time npm package name validation with helpful suggestions and colored feedback
|
|
40
40
|
- **Enhanced CLI UX** - Beautiful formatted help text with colors, boxes, and comprehensive examples
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
41
|
+
- **Always Up-to-Date** - Leverages official CLIs to ensure latest best practices and configurations
|
|
42
|
+
- **Non-Interactive Mode** - Properly configured for CI/CD with no hanging prompts
|
|
43
43
|
- **Flexible Architecture** - Feature-based, type-based, domain-driven, clean architecture structures
|
|
44
44
|
- **Docker Ready** - Complete Docker orchestration with multi-stage builds and docker-compose
|
|
45
45
|
- **API Integration** - Seamless frontend-backend communication with axios interceptors
|
|
@@ -110,32 +110,30 @@ Want to contribute or add a custom template?
|
|
|
110
110
|
|
|
111
111
|
### šÆ Project Types
|
|
112
112
|
|
|
113
|
-
| Type | Description
|
|
114
|
-
| ------------------- |
|
|
115
|
-
| **Frontend Only** | Single-page applications
|
|
116
|
-
| **Backend Only** | REST APIs and services
|
|
117
|
-
| **
|
|
118
|
-
| **Node.js Library** | Publishable npm packages | Reusable modules and utilities |
|
|
113
|
+
| Type | Description | Use Case |
|
|
114
|
+
| ------------------- | ------------------------ | -------------------------------- |
|
|
115
|
+
| **Frontend Only** | Single-page applications | React, Vue, Next.js apps |
|
|
116
|
+
| **Backend Only** | REST APIs and services | Express, NestJS, Fastify servers |
|
|
117
|
+
| **Node.js Library** | Publishable npm packages | Reusable modules and utilities |
|
|
119
118
|
|
|
120
119
|
### šØ Framework Support
|
|
121
120
|
|
|
122
121
|
**Frontend Frameworks:**
|
|
123
122
|
|
|
124
|
-
- React (
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
- Svelte (SvelteKit)
|
|
128
|
-
- Next.js (App Router & Pages Router)
|
|
129
|
-
- Nuxt.js (Vue 3)
|
|
130
|
-
- Vanilla JavaScript (Modern ES6+)
|
|
123
|
+
- React + Vite (Fast HMR, modern build tool)
|
|
124
|
+
- Next.js (App Router with TypeScript)
|
|
125
|
+
- Vue.js + Vite (Progressive framework)
|
|
131
126
|
|
|
132
127
|
**Backend Frameworks:**
|
|
133
128
|
|
|
134
129
|
- Express.js (Minimalist & flexible)
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
130
|
+
|
|
131
|
+
**Coming Soon:**
|
|
132
|
+
|
|
133
|
+
- NestJS (Enterprise TypeScript) - Code ready, testing in progress
|
|
134
|
+
- Fastify (High performance) - Code ready, testing in progress
|
|
135
|
+
- Nuxt.js (Vue 3) - Code ready, testing in progress
|
|
136
|
+
- Svelte (Modern reactivity) - Code ready, testing in progress
|
|
139
137
|
|
|
140
138
|
**Databases:**
|
|
141
139
|
|
|
@@ -168,31 +166,7 @@ Want to contribute or add a custom template?
|
|
|
168
166
|
- Environment variables (.env setup)
|
|
169
167
|
- Turborepo (monorepo build system)
|
|
170
168
|
|
|
171
|
-
###
|
|
172
|
-
|
|
173
|
-
**Monorepo (Turborepo):**
|
|
174
|
-
|
|
175
|
-
- Shared packages (types, UI components)
|
|
176
|
-
- Unified workspace management
|
|
177
|
-
- Optimized build pipeline
|
|
178
|
-
- Consistent tooling across apps
|
|
179
|
-
|
|
180
|
-
**Traditional Stack Options:**
|
|
181
|
-
|
|
182
|
-
- **MERN** - MongoDB + Express + React + Node
|
|
183
|
-
- **PERN** - PostgreSQL + Express + React + Node
|
|
184
|
-
- **Next.js + Express** - Full-stack React with API
|
|
185
|
-
- **Laravel + React** - PHP backend with React frontend
|
|
186
|
-
|
|
187
|
-
**Features:**
|
|
188
|
-
|
|
189
|
-
- API integration (Vite proxy, Next.js rewrites)
|
|
190
|
-
- Docker orchestration (frontend + backend + database)
|
|
191
|
-
- Environment configuration
|
|
192
|
-
- Shared TypeScript types
|
|
193
|
-
- Reusable UI components
|
|
194
|
-
|
|
195
|
-
### šØ Styling Solutions
|
|
169
|
+
### Styling Solutions
|
|
196
170
|
|
|
197
171
|
| Solution | Description | Best For |
|
|
198
172
|
| --------------------- | ------------------------------- | ------------------------------ |
|
|
@@ -341,90 +315,98 @@ my-react-app/
|
|
|
341
315
|
āāā package.json
|
|
342
316
|
```
|
|
343
317
|
|
|
344
|
-
### Example 2:
|
|
318
|
+
### Example 2: Next.js with TypeScript
|
|
345
319
|
|
|
346
320
|
```bash
|
|
347
|
-
initkit
|
|
348
|
-
# Select:
|
|
321
|
+
initkit nextjs-app
|
|
322
|
+
# Select: Frontend Only ā Next.js ā TypeScript ā Tailwind CSS
|
|
349
323
|
```
|
|
350
324
|
|
|
351
325
|
**Generated Structure:**
|
|
352
326
|
|
|
353
327
|
```
|
|
354
|
-
|
|
355
|
-
āāā
|
|
356
|
-
ā āāā
|
|
357
|
-
ā ā āāā
|
|
358
|
-
ā ā
|
|
359
|
-
ā
|
|
360
|
-
ā āāā
|
|
361
|
-
ā āāā
|
|
362
|
-
āāā
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
ā āāā package.json
|
|
369
|
-
āāā docker-compose.yml # MongoDB + Frontend + Backend
|
|
370
|
-
āāā README.md
|
|
328
|
+
nextjs-app/
|
|
329
|
+
āāā src/
|
|
330
|
+
ā āāā app/
|
|
331
|
+
ā ā āāā page.tsx
|
|
332
|
+
ā ā āāā layout.tsx
|
|
333
|
+
ā āāā components/
|
|
334
|
+
ā āāā features/
|
|
335
|
+
ā āāā lib/
|
|
336
|
+
āāā public/
|
|
337
|
+
āāā .eslintrc.json
|
|
338
|
+
āāā next.config.js
|
|
339
|
+
āāā tsconfig.json
|
|
340
|
+
āāā tailwind.config.js
|
|
341
|
+
āāā package.json
|
|
371
342
|
```
|
|
372
343
|
|
|
373
|
-
### Example 3:
|
|
344
|
+
### Example 3: Vue with TypeScript
|
|
374
345
|
|
|
375
346
|
```bash
|
|
376
|
-
initkit
|
|
377
|
-
# Select:
|
|
347
|
+
initkit vue-app
|
|
348
|
+
# Select: Frontend Only ā Vue ā TypeScript ā Tailwind CSS
|
|
378
349
|
```
|
|
379
350
|
|
|
380
351
|
**Generated Structure:**
|
|
381
352
|
|
|
382
353
|
```
|
|
383
|
-
|
|
384
|
-
āāā
|
|
385
|
-
ā āāā
|
|
386
|
-
ā
|
|
387
|
-
āāā
|
|
388
|
-
ā āāā
|
|
389
|
-
ā
|
|
390
|
-
āāā
|
|
391
|
-
|
|
354
|
+
vue-app/
|
|
355
|
+
āāā src/
|
|
356
|
+
ā āāā components/
|
|
357
|
+
ā āāā features/
|
|
358
|
+
ā āāā composables/
|
|
359
|
+
ā āāā stores/
|
|
360
|
+
ā āāā router/
|
|
361
|
+
ā āāā App.vue
|
|
362
|
+
ā āāā main.ts
|
|
363
|
+
āāā public/
|
|
364
|
+
āāā vite.config.ts
|
|
365
|
+
āāā tsconfig.json
|
|
392
366
|
āāā package.json
|
|
393
367
|
```
|
|
394
368
|
|
|
395
|
-
### Example 4: Express API
|
|
369
|
+
### Example 4: Express Backend API
|
|
396
370
|
|
|
397
371
|
```bash
|
|
398
372
|
initkit api-server
|
|
399
|
-
# Select: Backend Only ā Express ā
|
|
373
|
+
# Select: Backend Only ā Express ā JavaScript ā MVC structure
|
|
400
374
|
```
|
|
401
375
|
|
|
402
|
-
**
|
|
376
|
+
**Generated Structure:**
|
|
403
377
|
|
|
404
|
-
|
|
405
|
-
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
378
|
+
```
|
|
379
|
+
api-server/
|
|
380
|
+
āāā models/
|
|
381
|
+
āāā controllers/
|
|
382
|
+
āāā routes/
|
|
383
|
+
ā āāā index.js
|
|
384
|
+
ā āāā users.js
|
|
385
|
+
āāā middlewares/
|
|
386
|
+
āāā services/
|
|
387
|
+
āāā .env.example
|
|
388
|
+
āāā app.js
|
|
389
|
+
āāā package.json
|
|
390
|
+
```
|
|
409
391
|
|
|
410
392
|
### Example 5: Quick Start with Defaults
|
|
411
393
|
|
|
412
394
|
```bash
|
|
413
395
|
initkit quick-app --yes
|
|
414
|
-
# Creates a
|
|
396
|
+
# Creates a React + Vite app with TypeScript + Tailwind CSS
|
|
415
397
|
```
|
|
416
398
|
|
|
417
399
|
---
|
|
418
400
|
|
|
419
401
|
## Interactive Prompt Flow
|
|
420
402
|
|
|
421
|
-
InitKit uses an intelligent
|
|
403
|
+
InitKit uses an intelligent question flow that adapts based on your project type:
|
|
422
404
|
|
|
423
|
-
1. **Project Type** - Frontend, Backend,
|
|
405
|
+
1. **Project Type** - Frontend, Backend, or Library
|
|
424
406
|
2. **Project Name** - With real-time validation and suggestions
|
|
425
|
-
3. **Frontend Framework** - Shown for Frontend
|
|
426
|
-
4. **Backend Framework** - Shown for Backend
|
|
427
|
-
5. **Database** - Shown for Backend
|
|
407
|
+
3. **Frontend Framework** - Shown for Frontend projects
|
|
408
|
+
4. **Backend Framework** - Shown for Backend projects
|
|
409
|
+
5. **Database/ORM** - Shown for Backend projects
|
|
428
410
|
6. **Language** - TypeScript (recommended) or JavaScript
|
|
429
411
|
7. **Folder Structure** - Feature-based, Type-based, Domain-driven, or Flat
|
|
430
412
|
8. **TypeScript Strictness** - Strict, Moderate, or Relaxed (if TS selected)
|
|
@@ -444,12 +426,12 @@ See [QUESTION_FLOW.md](./QUESTION_FLOW.md) for the complete decision tree.
|
|
|
444
426
|
|
|
445
427
|
Unlike other scaffolding tools, InitKit generates **truly production-ready** projects:
|
|
446
428
|
|
|
447
|
-
- **
|
|
448
|
-
- **
|
|
449
|
-
- **
|
|
450
|
-
- **
|
|
451
|
-
- **
|
|
452
|
-
- **
|
|
429
|
+
- **Official CLIs** - Uses create-next-app, create-vite, create-vue, express-generator for best practices
|
|
430
|
+
- **Always Current** - Leverages framework maintainers' latest configurations
|
|
431
|
+
- **No Hanging** - Properly configured non-interactive mode for CI/CD pipelines
|
|
432
|
+
- **TypeScript First** - Full TypeScript support with proper configurations
|
|
433
|
+
- **Best Practices Built-in** - ESLint, Prettier, proper folder structures
|
|
434
|
+
- **Package Manager Choice** - Full support for npm, yarn, pnpm, and bun
|
|
453
435
|
|
|
454
436
|
### š Developer Experience
|
|
455
437
|
|
|
@@ -729,33 +711,43 @@ initkit my-app --verbose
|
|
|
729
711
|
|
|
730
712
|
## Recent Updates
|
|
731
713
|
|
|
732
|
-
### Version 1.
|
|
714
|
+
### Version 1.2.0 (Latest) š
|
|
715
|
+
|
|
716
|
+
**š BREAKING CHANGES:**
|
|
733
717
|
|
|
734
|
-
|
|
718
|
+
- **Removed fullstack project type** - Simplified to focus on stable frontend and backend options
|
|
719
|
+
- **Migrated to CLI-first architecture** - Now uses official framework CLIs exclusively
|
|
735
720
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
-
|
|
740
|
-
- React
|
|
741
|
-
-
|
|
742
|
-
-
|
|
743
|
-
|
|
744
|
-
-
|
|
721
|
+
**⨠Major Features:**
|
|
722
|
+
|
|
723
|
+
- **CLI-First Architecture** - Uses official CLIs for all frameworks:
|
|
724
|
+
- `create-next-app` for Next.js projects
|
|
725
|
+
- `create-vite@5.1.0` for React (pinned for stability)
|
|
726
|
+
- `create-vue` with `--typescript --default` for Vue
|
|
727
|
+
- `express-generator` for Express backends
|
|
728
|
+
- **Enhanced Logging** - Emoji-based progress indicators (š¦) with detailed command visibility
|
|
729
|
+
- **Non-Interactive Mode** - All frameworks properly configured for CI/CD (no hanging prompts)
|
|
745
730
|
|
|
746
731
|
**š Bug Fixes:**
|
|
747
732
|
|
|
748
|
-
- Fixed
|
|
749
|
-
- Fixed
|
|
750
|
-
- Fixed
|
|
751
|
-
- Fixed
|
|
733
|
+
- Fixed package manager override bug (CLI default removed)
|
|
734
|
+
- Fixed create-vite@8.x hanging (pinned to stable v5.1.0)
|
|
735
|
+
- Fixed create-vue prompting (added --default flag)
|
|
736
|
+
- Fixed CI environment variable for non-interactive execution
|
|
752
737
|
|
|
753
738
|
**š§ Improvements:**
|
|
754
739
|
|
|
755
|
-
-
|
|
756
|
-
-
|
|
757
|
-
-
|
|
758
|
-
-
|
|
740
|
+
- Always uses latest framework configurations from official CLIs
|
|
741
|
+
- Better error messages and rollback handling
|
|
742
|
+
- Cleaner codebase with removed legacy template files
|
|
743
|
+
- All tests passing (48/48)
|
|
744
|
+
|
|
745
|
+
**š Test Results:**
|
|
746
|
+
|
|
747
|
+
- React + Vite: ā
16.5s (218 packages)
|
|
748
|
+
- Next.js: ā
26.9s (347 packages)
|
|
749
|
+
- Vue: ā
16.2s (153 packages)
|
|
750
|
+
- Express: ā
12.3s (53 packages)
|
|
759
751
|
|
|
760
752
|
---
|
|
761
753
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "initkit",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A modern CLI tool for scaffolding production-ready web projects with live npm version fetching, multiple frameworks, and best practices built-in",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,14 +32,11 @@
|
|
|
32
32
|
"vue",
|
|
33
33
|
"express",
|
|
34
34
|
"typescript",
|
|
35
|
-
"fullstack",
|
|
36
|
-
"monorepo",
|
|
37
35
|
"vite",
|
|
38
36
|
"tailwind",
|
|
39
37
|
"redux-toolkit",
|
|
40
38
|
"prisma",
|
|
41
|
-
"docker"
|
|
42
|
-
"turborepo"
|
|
39
|
+
"docker"
|
|
43
40
|
],
|
|
44
41
|
"author": "Shirish Shrestha <shirishshrestha07@gmail.com>",
|
|
45
42
|
"license": "MIT",
|
package/src/cli.js
CHANGED
|
@@ -19,15 +19,41 @@ const packageJson = require('../package.json');
|
|
|
19
19
|
function displayBanner() {
|
|
20
20
|
console.log('');
|
|
21
21
|
console.log(chalk.cyan('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
22
|
-
console.log(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
console.log(
|
|
22
|
+
console.log(
|
|
23
|
+
chalk.cyan('ā') +
|
|
24
|
+
chalk.cyan.bold(' ') +
|
|
25
|
+
chalk.cyan('ā')
|
|
26
|
+
);
|
|
27
|
+
console.log(
|
|
28
|
+
chalk.cyan('ā') +
|
|
29
|
+
chalk.cyan.bold(' Welcome to InitKit CLI! ') +
|
|
30
|
+
chalk.cyan('ā')
|
|
31
|
+
);
|
|
32
|
+
console.log(
|
|
33
|
+
chalk.cyan('ā') +
|
|
34
|
+
chalk.cyan.bold(' ') +
|
|
35
|
+
chalk.cyan('ā')
|
|
36
|
+
);
|
|
37
|
+
console.log(
|
|
38
|
+
chalk.cyan('ā') +
|
|
39
|
+
chalk.white(' Scaffold modern web projects with best ') +
|
|
40
|
+
chalk.cyan('ā')
|
|
41
|
+
);
|
|
42
|
+
console.log(
|
|
43
|
+
chalk.cyan('ā') +
|
|
44
|
+
chalk.white(' practices and lightning-fast speed ā” ') +
|
|
45
|
+
chalk.cyan('ā')
|
|
46
|
+
);
|
|
47
|
+
console.log(
|
|
48
|
+
chalk.cyan('ā') +
|
|
49
|
+
chalk.cyan.bold(' ') +
|
|
50
|
+
chalk.cyan('ā')
|
|
51
|
+
);
|
|
28
52
|
console.log(chalk.cyan('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
29
53
|
console.log('');
|
|
30
|
-
console.log(
|
|
54
|
+
console.log(
|
|
55
|
+
chalk.gray(` Version ${packageJson.version} | Made with ā¤ļø by developers\n`)
|
|
56
|
+
);
|
|
31
57
|
}
|
|
32
58
|
|
|
33
59
|
// Set up the CLI program
|
|
@@ -37,7 +63,9 @@ program
|
|
|
37
63
|
.description(packageJson.description)
|
|
38
64
|
.usage('[command] [options]')
|
|
39
65
|
.version(packageJson.version, '-v, --version', 'Output the current version')
|
|
40
|
-
.addHelpText(
|
|
66
|
+
.addHelpText(
|
|
67
|
+
'after',
|
|
68
|
+
`
|
|
41
69
|
Examples:
|
|
42
70
|
$ initkit # Interactive mode with step-by-step prompts
|
|
43
71
|
$ initkit my-app # Create project with interactive prompts
|
|
@@ -50,7 +78,8 @@ Documentation:
|
|
|
50
78
|
GitHub: https://github.com/shirishshrestha/initkit
|
|
51
79
|
|
|
52
80
|
Need help? Report issues at: https://github.com/shirishshrestha/initkit/issues
|
|
53
|
-
`
|
|
81
|
+
`
|
|
82
|
+
);
|
|
54
83
|
|
|
55
84
|
// Main create command
|
|
56
85
|
program
|
|
@@ -62,9 +91,11 @@ program
|
|
|
62
91
|
.option('--js, --javascript', 'Use JavaScript instead of TypeScript')
|
|
63
92
|
.option('--no-git', 'Skip Git repository initialization')
|
|
64
93
|
.option('--no-install', 'Skip automatic dependency installation')
|
|
65
|
-
.option('-p, --package-manager <manager>', 'Package manager (npm, yarn, pnpm)'
|
|
94
|
+
.option('-p, --package-manager <manager>', 'Package manager (npm, yarn, pnpm)')
|
|
66
95
|
.option('--verbose', 'Show detailed output and logs')
|
|
67
|
-
.addHelpText(
|
|
96
|
+
.addHelpText(
|
|
97
|
+
'after',
|
|
98
|
+
`
|
|
68
99
|
Examples:
|
|
69
100
|
$ initkit create my-react-app
|
|
70
101
|
$ initkit create api-server --template express --typescript
|
|
@@ -80,7 +111,8 @@ The create command guides you through an interactive setup with 13 questions:
|
|
|
80
111
|
7. Additional tools (Docker, CI/CD, Testing)
|
|
81
112
|
8. Package manager choice
|
|
82
113
|
9. Git initialization
|
|
83
|
-
`
|
|
114
|
+
`
|
|
115
|
+
)
|
|
84
116
|
.action(async (projectName, options) => {
|
|
85
117
|
try {
|
|
86
118
|
displayBanner();
|
|
@@ -117,12 +149,12 @@ The create command guides you through an interactive setup with 13 questions:
|
|
|
117
149
|
// Use default configuration
|
|
118
150
|
answers = {
|
|
119
151
|
projectName: projectName || 'my-project',
|
|
120
|
-
projectType: '
|
|
152
|
+
projectType: 'frontend',
|
|
121
153
|
frontend: 'react',
|
|
122
|
-
backend: 'express',
|
|
123
154
|
language: options.javascript ? 'javascript' : 'typescript',
|
|
124
155
|
folderStructure: 'feature-based',
|
|
125
156
|
typescriptStrict: 'strict',
|
|
157
|
+
styling: 'tailwind',
|
|
126
158
|
useGit: options.git !== false,
|
|
127
159
|
installDependencies: options.install !== false,
|
|
128
160
|
packageManager: options.packageManager || 'npm',
|
|
@@ -131,17 +163,20 @@ The create command guides you through an interactive setup with 13 questions:
|
|
|
131
163
|
};
|
|
132
164
|
} else {
|
|
133
165
|
// Interactive prompts
|
|
134
|
-
console.log(chalk.cyan(
|
|
166
|
+
console.log(chalk.cyan("Let's set up your project!\n"));
|
|
135
167
|
const questions = getQuestions(projectName);
|
|
136
168
|
answers = await inquirer.prompt(questions);
|
|
137
|
-
|
|
169
|
+
|
|
138
170
|
// Set additional options from CLI flags
|
|
139
171
|
if (options.javascript) {
|
|
140
172
|
answers.language = 'javascript';
|
|
141
173
|
}
|
|
142
174
|
answers.useGit = options.git !== false;
|
|
143
175
|
answers.installDependencies = options.install !== false;
|
|
144
|
-
|
|
176
|
+
// Only override packageManager if explicitly provided via CLI flag
|
|
177
|
+
if (options.packageManager) {
|
|
178
|
+
answers.packageManager = options.packageManager;
|
|
179
|
+
}
|
|
145
180
|
}
|
|
146
181
|
|
|
147
182
|
// Derive projectPath if not set
|
|
@@ -160,7 +195,6 @@ The create command guides you through an interactive setup with 13 questions:
|
|
|
160
195
|
});
|
|
161
196
|
|
|
162
197
|
// Success message is now part of the comprehensive summary in create.js
|
|
163
|
-
|
|
164
198
|
} catch (error) {
|
|
165
199
|
displayError(error, { projectName });
|
|
166
200
|
process.exit(1);
|
|
@@ -175,27 +209,28 @@ program
|
|
|
175
209
|
console.log(chalk.cyan.bold('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
176
210
|
console.log(chalk.cyan.bold('ā InitKit CLI Information ā'));
|
|
177
211
|
console.log(chalk.cyan.bold('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
178
|
-
|
|
212
|
+
|
|
179
213
|
console.log(chalk.white.bold('Version: ') + chalk.green(packageJson.version));
|
|
180
214
|
console.log(chalk.white.bold('Description: ') + chalk.gray(packageJson.description));
|
|
181
215
|
console.log(chalk.white.bold('Author: ') + chalk.gray(packageJson.author));
|
|
182
216
|
console.log(chalk.white.bold('License: ') + chalk.gray(packageJson.license));
|
|
183
|
-
console.log(
|
|
184
|
-
|
|
217
|
+
console.log(
|
|
218
|
+
chalk.white.bold('Repository: ') + chalk.blue(packageJson.repository?.url || 'N/A')
|
|
219
|
+
);
|
|
220
|
+
|
|
185
221
|
console.log(chalk.yellow.bold('\nSupported Frameworks:'));
|
|
186
222
|
console.log(chalk.gray(' Frontend: ') + 'React, Vue, Next.js, Angular, Svelte, Nuxt');
|
|
187
223
|
console.log(chalk.gray(' Backend: ') + 'Express, NestJS, Fastify, Koa, Hapi');
|
|
188
224
|
console.log(chalk.gray(' Database: ') + 'PostgreSQL, MongoDB, MySQL, SQLite');
|
|
189
|
-
|
|
225
|
+
|
|
190
226
|
console.log(chalk.yellow.bold('\nFeatures:'));
|
|
191
227
|
console.log(chalk.gray(' ā Interactive project scaffolding'));
|
|
192
228
|
console.log(chalk.gray(' ā TypeScript & JavaScript support'));
|
|
193
|
-
console.log(chalk.gray(' ā Full-stack monorepo with Turborepo'));
|
|
194
229
|
console.log(chalk.gray(' ā Docker & Docker Compose'));
|
|
195
230
|
console.log(chalk.gray(' ā CI/CD with GitHub Actions'));
|
|
196
231
|
console.log(chalk.gray(' ā ESLint, Prettier, Husky'));
|
|
197
232
|
console.log(chalk.gray(' ā Automatic rollback on errors'));
|
|
198
|
-
|
|
233
|
+
|
|
199
234
|
console.log(chalk.cyan('\nš” Get started: ') + chalk.white('initkit --help\n'));
|
|
200
235
|
});
|
|
201
236
|
|
|
@@ -207,35 +242,43 @@ program
|
|
|
207
242
|
console.log(chalk.cyan.bold('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
208
243
|
console.log(chalk.cyan.bold('ā Available Templates & Tools ā'));
|
|
209
244
|
console.log(chalk.cyan.bold('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
210
|
-
|
|
245
|
+
|
|
211
246
|
console.log(chalk.yellow.bold('šØ Frontend Frameworks:'));
|
|
212
|
-
console.log(
|
|
213
|
-
|
|
247
|
+
console.log(
|
|
248
|
+
chalk.gray(' ⢠React ') + chalk.dim('- Popular library for building UIs')
|
|
249
|
+
);
|
|
250
|
+
console.log(
|
|
251
|
+
chalk.gray(' ⢠Vue.js ') + chalk.dim('- Progressive JavaScript framework')
|
|
252
|
+
);
|
|
214
253
|
console.log(chalk.gray(' ⢠Next.js ') + chalk.dim('- React framework with SSR & SSG'));
|
|
215
|
-
console.log(
|
|
254
|
+
console.log(
|
|
255
|
+
chalk.gray(' ⢠Angular ') + chalk.dim('- Platform for building applications')
|
|
256
|
+
);
|
|
216
257
|
console.log(chalk.gray(' ⢠Svelte ') + chalk.dim('- Compile-time framework'));
|
|
217
258
|
console.log(chalk.gray(' ⢠Nuxt.js ') + chalk.dim('- Vue.js framework with SSR'));
|
|
218
|
-
|
|
259
|
+
|
|
219
260
|
console.log(chalk.yellow.bold('\nāļø Backend Frameworks:'));
|
|
220
261
|
console.log(chalk.gray(' ⢠Express.js ') + chalk.dim('- Fast, minimalist web framework'));
|
|
221
262
|
console.log(chalk.gray(' ⢠NestJS ') + chalk.dim('- Progressive Node.js framework'));
|
|
222
263
|
console.log(chalk.gray(' ⢠Fastify ') + chalk.dim('- Fast and low overhead'));
|
|
223
264
|
console.log(chalk.gray(' ⢠Koa ') + chalk.dim('- Next generation web framework'));
|
|
224
|
-
console.log(
|
|
225
|
-
|
|
265
|
+
console.log(
|
|
266
|
+
chalk.gray(' ⢠Hapi ') + chalk.dim('- Rich framework for building applications')
|
|
267
|
+
);
|
|
268
|
+
|
|
226
269
|
console.log(chalk.yellow.bold('\nš¾ Databases:'));
|
|
227
270
|
console.log(chalk.gray(' ⢠PostgreSQL ') + chalk.dim('- Advanced relational database'));
|
|
228
271
|
console.log(chalk.gray(' ⢠MongoDB ') + chalk.dim('- NoSQL document database'));
|
|
229
272
|
console.log(chalk.gray(' ⢠MySQL ') + chalk.dim('- Popular relational database'));
|
|
230
273
|
console.log(chalk.gray(' ⢠SQLite ') + chalk.dim('- Lightweight embedded database'));
|
|
231
|
-
|
|
274
|
+
|
|
232
275
|
console.log(chalk.yellow.bold('\nšØ Styling Solutions:'));
|
|
233
276
|
console.log(chalk.gray(' ⢠Tailwind CSS ') + chalk.dim('- Utility-first CSS framework'));
|
|
234
277
|
console.log(chalk.gray(' ⢠CSS Modules ') + chalk.dim('- Locally scoped CSS'));
|
|
235
278
|
console.log(chalk.gray(' ⢠Styled Comp. ') + chalk.dim('- CSS-in-JS solution'));
|
|
236
279
|
console.log(chalk.gray(' ⢠Sass/SCSS ') + chalk.dim('- CSS preprocessor'));
|
|
237
280
|
console.log(chalk.gray(' ⢠Emotion ') + chalk.dim('- Performant CSS-in-JS'));
|
|
238
|
-
|
|
281
|
+
|
|
239
282
|
console.log(chalk.yellow.bold('\nš ļø Development Tools:'));
|
|
240
283
|
console.log(chalk.gray(' ⢠Docker ') + chalk.dim('- Containerization'));
|
|
241
284
|
console.log(chalk.gray(' ⢠GitHub Actions ') + chalk.dim('- CI/CD automation'));
|
|
@@ -243,7 +286,7 @@ program
|
|
|
243
286
|
console.log(chalk.gray(' ⢠Prettier ') + chalk.dim('- Code formatting'));
|
|
244
287
|
console.log(chalk.gray(' ⢠Jest/Vitest ') + chalk.dim('- Testing frameworks'));
|
|
245
288
|
console.log(chalk.gray(' ⢠Turborepo ') + chalk.dim('- Monorepo build system'));
|
|
246
|
-
|
|
289
|
+
|
|
247
290
|
console.log(chalk.cyan('\nš” Create a project: ') + chalk.white('initkit [project-name]\n'));
|
|
248
291
|
});
|
|
249
292
|
|