novatec-cli 1.0.0
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/LICENSE +21 -0
- package/README.md +331 -0
- package/bin/index.js +147 -0
- package/lib/create.js +278 -0
- package/lib/generators/backend.js +337 -0
- package/lib/generators/frontend.js +81 -0
- package/lib/generators/readme.js +99 -0
- package/lib/prompts.js +348 -0
- package/lib/utils.js +40 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NOVATEC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
# 🚀 NOVATEC Fullstack CLI
|
|
2
|
+
|
|
3
|
+
> **Generador profesional de proyectos full stack** — Crea proyectos listos para producción en segundos con tu combinación favorita de frontend y backend.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/novatec-fullstack-cli)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 📦 Instalación Global
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g novatec-fullstack-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Después de instalar, el comando `novatec` estará disponible globalmente en tu terminal.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🎯 Uso Rápido
|
|
22
|
+
|
|
23
|
+
### Crear un nuevo proyecto
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
novatec create my-awesome-app
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
El CLI te guiará interactivamente para elegir:
|
|
30
|
+
|
|
31
|
+
- **Frontend**: React, Next.js, Vue, Nuxt, Astro, Svelte, SolidJS, Angular, Remix, Qwik
|
|
32
|
+
- **Backend**: Express, NestJS, Fastify, Hono, FastAPI, Django, Flask, Spring Boot, Deno, Go/Gin
|
|
33
|
+
- **Dependencias adicionales** por framework
|
|
34
|
+
|
|
35
|
+
### Con flags (opcional)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
novatec create my-app --frontend react --backend express
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🛠️ Tecnologías Soportadas
|
|
44
|
+
|
|
45
|
+
### Frontend
|
|
46
|
+
|
|
47
|
+
| Framework | Bundler | Características |
|
|
48
|
+
|-----------|---------|-----------------|
|
|
49
|
+
| **React** | Vite | SPA rápida, 18+, hooks |
|
|
50
|
+
| **Next.js** | Next.js | SSR, SSG, App Router, FullStack |
|
|
51
|
+
| **Vue** | Vite | SPA reactiva, Composition API |
|
|
52
|
+
| **Nuxt** | Nuxt | SSR/SSG, i18n, módulos |
|
|
53
|
+
| **Astro** | Astro | MPA ultra-rápido, islands |
|
|
54
|
+
| **Svelte** | SvelteKit | SSR/SSG, reactividad única |
|
|
55
|
+
| **SolidJS** | Vite | Reactividad sin Virtual DOM |
|
|
56
|
+
| **Angular** | Angular CLI | Enterprise-grade |
|
|
57
|
+
| **Remix** | Remix | Full-stack React, loaders |
|
|
58
|
+
| **Qwik** | Qwik | Resumability, carga instantánea |
|
|
59
|
+
|
|
60
|
+
### Backend
|
|
61
|
+
|
|
62
|
+
| Framework | Runtime | Características |
|
|
63
|
+
|-----------|---------|-----------------|
|
|
64
|
+
| **Express** | Node.js | Minimalista, flexible |
|
|
65
|
+
| **NestJS** | Node.js | Modular, TypeScript-first |
|
|
66
|
+
| **Fastify** | Node.js | Ultra-rápido, plugins |
|
|
67
|
+
| **Hono** | Node.js/Edge | Ligero, edge-ready |
|
|
68
|
+
| **FastAPI** | Python | Async, auto-docs |
|
|
69
|
+
| **Django** | Python | Batteries-included |
|
|
70
|
+
| **Flask** | Python | Micro-framework flexible |
|
|
71
|
+
| **Spring Boot** | Java | Enterprise, robusto |
|
|
72
|
+
| **Deno** | Deno | TypeScript seguro |
|
|
73
|
+
| **Go/Gin** | Go | Alto rendimiento |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 📁 Estructura Generada
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
my-awesome-app/
|
|
81
|
+
├── frontend/
|
|
82
|
+
│ ├── src/
|
|
83
|
+
│ ├── public/
|
|
84
|
+
│ ├── package.json
|
|
85
|
+
│ └── [config files]
|
|
86
|
+
├── backend/
|
|
87
|
+
│ ├── src/ (o app/ para Python)
|
|
88
|
+
│ ├── package.json (o requirements.txt para Python)
|
|
89
|
+
│ └── [config files]
|
|
90
|
+
├── README.md
|
|
91
|
+
└── .gitignore (opcional)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🚀 Primeros Pasos
|
|
97
|
+
|
|
98
|
+
Después de crear tu proyecto:
|
|
99
|
+
|
|
100
|
+
### 1. Navega al directorio
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cd my-awesome-app
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 2. Instala y ejecuta frontend
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
cd frontend
|
|
110
|
+
npm install
|
|
111
|
+
npm run dev
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 3. En otra terminal, ejecuta backend
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
cd backend
|
|
118
|
+
npm install # o 'pip install -r requirements.txt' para Python
|
|
119
|
+
npm run dev # o el comando específico del framework
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 4. Comienza a desarrollar
|
|
123
|
+
|
|
124
|
+
- **Frontend**: Abre `http://localhost:5173` (Vite) o `http://localhost:3000` (Next.js)
|
|
125
|
+
- **Backend**: Típicamente en `http://localhost:3001` (Node) o `http://localhost:8000` (Python)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 🎨 Dependencias Opcionales
|
|
130
|
+
|
|
131
|
+
El CLI te permite agregar dependencias populares:
|
|
132
|
+
|
|
133
|
+
### Frontend
|
|
134
|
+
- `axios`, `react-router-dom`, `zustand`, `tailwindcss`, `shadcn/ui`, `framer-motion`, etc.
|
|
135
|
+
|
|
136
|
+
### Backend
|
|
137
|
+
- `cors`, `helmet`, `socket.io`, `swagger-ui-express`, `typeorm`, `prisma`, etc.
|
|
138
|
+
|
|
139
|
+
### Extras
|
|
140
|
+
- **.env**: Archivos de configuración
|
|
141
|
+
- **ESLint + Prettier**: Linting y formato
|
|
142
|
+
- **Husky**: Git hooks
|
|
143
|
+
- **Testing**: Jest, Vitest, pytest
|
|
144
|
+
- **CI/CD**: GitHub Actions
|
|
145
|
+
- **Docker**: Dockerfiles y docker-compose
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 🔧 Configuración Avanzada
|
|
150
|
+
|
|
151
|
+
### Variables de Entorno
|
|
152
|
+
|
|
153
|
+
Después de crear tu proyecto, configura `.env` en frontend y backend:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# backend/.env
|
|
157
|
+
PORT=3001
|
|
158
|
+
DATABASE_URL=postgresql://user:password@localhost/dbname
|
|
159
|
+
JWT_SECRET=your-secret-key
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Scripts Disponibles
|
|
163
|
+
|
|
164
|
+
Cada proyecto genera scripts útiles:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Frontend (generalmente)
|
|
168
|
+
npm run dev # Desarrollo
|
|
169
|
+
npm run build # Build para producción
|
|
170
|
+
npm run preview # Preview del build
|
|
171
|
+
|
|
172
|
+
# Backend (Node.js)
|
|
173
|
+
npm run dev # Desarrollo con nodemon
|
|
174
|
+
npm start # Producción
|
|
175
|
+
|
|
176
|
+
# Backend (Python)
|
|
177
|
+
pip install -r requirements.txt
|
|
178
|
+
python main.py # FastAPI
|
|
179
|
+
python manage.py runserver # Django
|
|
180
|
+
python run.py # Flask
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 🐳 Docker (Opcional)
|
|
186
|
+
|
|
187
|
+
Si seleccionas Docker en extras, obtendrás:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
docker-compose up --build
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Esto levantará frontend, backend y base de datos en contenedores.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 📚 Ejemplos Prácticos
|
|
198
|
+
|
|
199
|
+
### React + Express + SQLite
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
novatec create blog-app --frontend react --backend express
|
|
203
|
+
cd blog-app/backend
|
|
204
|
+
npm install sqlite3 cors dotenv
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Next.js + NestJS + PostgreSQL
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
novatec create saas-app --frontend next --backend nestjs
|
|
211
|
+
cd saas-app/backend
|
|
212
|
+
npm install @nestjs/typeorm typeorm pg
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Vue + FastAPI
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
novatec create dashboard --frontend vue --backend fastapi
|
|
219
|
+
cd dashboard/backend
|
|
220
|
+
pip install sqlalchemy psycopg2
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## ⚡ Flags Disponibles
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
novatec create <project-name> [options]
|
|
229
|
+
|
|
230
|
+
Options:
|
|
231
|
+
--frontend <type> Frontend framework (react, next, vue, nuxt, astro, svelte, solid, angular, remix, qwik)
|
|
232
|
+
--backend <type> Backend framework (express, nestjs, fastify, hono, fastapi, django, flask, spring, deno, gin)
|
|
233
|
+
-h, --help Mostrar ayuda
|
|
234
|
+
-v, --version Mostrar versión
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## 🐛 Solución de Problemas
|
|
240
|
+
|
|
241
|
+
### El comando `novatec` no se reconoce
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Reinstala globalmente
|
|
245
|
+
npm install -g novatec-fullstack-cli
|
|
246
|
+
|
|
247
|
+
# O crea un symlink local
|
|
248
|
+
npm link
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Error: Node version too old
|
|
252
|
+
|
|
253
|
+
Necesitas Node.js >= 18. Descarga desde [nodejs.org](https://nodejs.org)
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
node --version
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Problemas con Python
|
|
260
|
+
|
|
261
|
+
Asegúrate de tener Python >= 3.8:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
python --version
|
|
265
|
+
pip install virtualenv
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Limpia caché si hay problemas
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
npm cache clean --force
|
|
272
|
+
npm install -g novatec-fullstack-cli@latest
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 🛠️ Desarrollo Local
|
|
278
|
+
|
|
279
|
+
Para trabajar en el CLI mismo:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
git clone https://github.com/yourusername/novatec-fullstack-cli.git
|
|
283
|
+
cd novatec-fullstack-cli
|
|
284
|
+
npm install
|
|
285
|
+
npm link
|
|
286
|
+
novatec create test-app
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## 📦 Publicación en npm
|
|
292
|
+
|
|
293
|
+
Cuando esté listo para publicar:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npm login
|
|
297
|
+
npm publish
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## 📝 Licencia
|
|
303
|
+
|
|
304
|
+
MIT © NOVATEC
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## 🤝 Contribuciones
|
|
309
|
+
|
|
310
|
+
Las contribuciones son bienvenidas. Por favor:
|
|
311
|
+
|
|
312
|
+
1. Haz fork del proyecto
|
|
313
|
+
2. Crea una rama (`git checkout -b feature/feature-name`)
|
|
314
|
+
3. Commit tus cambios (`git commit -am 'Add feature'`)
|
|
315
|
+
4. Push a la rama (`git push origin feature/feature-name`)
|
|
316
|
+
5. Abre un Pull Request
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 🙋 Soporte
|
|
321
|
+
|
|
322
|
+
¿Tienes problemas? Abre una [issue](https://github.com/yourusername/novatec-fullstack-cli/issues)
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## 🎉 Gracias por usar NOVATEC Fullstack CLI
|
|
327
|
+
|
|
328
|
+
Hecho con ❤️ por NOVATEC
|
|
329
|
+
|
|
330
|
+
**Versión**: 1.0.0
|
|
331
|
+
**Última actualización**: Mayo 2026
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { program } from 'commander';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import figlet from 'figlet';
|
|
6
|
+
import gradient from 'gradient-string';
|
|
7
|
+
import boxen from 'boxen';
|
|
8
|
+
import chalkAnimation from 'chalk-animation';
|
|
9
|
+
import { checkRequirements } from '../lib/utils.js';
|
|
10
|
+
import { runCreate } from '../lib/create.js';
|
|
11
|
+
|
|
12
|
+
function sleep(ms) {
|
|
13
|
+
return new Promise(r => setTimeout(r, ms));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Cicla cada carácter entre morado puro → blanco → morado oscuro (efecto RGB)
|
|
17
|
+
function rgbCycle(text, offset = 0) {
|
|
18
|
+
const palette = [
|
|
19
|
+
[120, 0, 200], // morado oscuro
|
|
20
|
+
[160, 0, 255], // morado puro
|
|
21
|
+
[190, 60, 255], // morado medio
|
|
22
|
+
[215,120, 255], // lavanda
|
|
23
|
+
[235,180, 255], // lavanda claro
|
|
24
|
+
[255,255, 255], // blanco
|
|
25
|
+
[235,180, 255], // lavanda claro
|
|
26
|
+
[215,120, 255], // lavanda
|
|
27
|
+
[190, 60, 255], // morado medio
|
|
28
|
+
[160, 0, 255], // morado puro
|
|
29
|
+
];
|
|
30
|
+
return text.split('').map((ch, i) => {
|
|
31
|
+
if (ch === ' ') return ch;
|
|
32
|
+
const [r, g, b] = palette[(i + offset) % palette.length];
|
|
33
|
+
return chalk.rgb(r, g, b)(ch);
|
|
34
|
+
}).join('');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function showBanner() {
|
|
38
|
+
console.clear();
|
|
39
|
+
|
|
40
|
+
const logo = figlet.textSync('NOVATEC', { font: 'ANSI Shadow' });
|
|
41
|
+
const lines = logo.split('\n').filter(l => l.trim());
|
|
42
|
+
|
|
43
|
+
// Animación: el gradiente RGB "corre" a través del texto
|
|
44
|
+
const FRAMES = 20;
|
|
45
|
+
for (let frame = 0; frame < FRAMES; frame++) {
|
|
46
|
+
if (frame > 0) process.stdout.write(`\x1B[${lines.length + 1}A`);
|
|
47
|
+
console.log();
|
|
48
|
+
lines.forEach((line, i) => {
|
|
49
|
+
console.log(' ' + rgbCycle(line, frame * 3 + i * 4));
|
|
50
|
+
});
|
|
51
|
+
await sleep(55);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
console.log();
|
|
55
|
+
|
|
56
|
+
// Subtítulo: animación glitch → queda fijo con gradiente morado-blanco
|
|
57
|
+
const sub = ' ◆ NOVATEC FULLSTACK CLI — Generador Profesional de Proyectos ◆';
|
|
58
|
+
const anim = chalkAnimation.glitch(sub);
|
|
59
|
+
await sleep(1200);
|
|
60
|
+
anim.stop();
|
|
61
|
+
process.stdout.write('\r');
|
|
62
|
+
console.log(gradient(['#7B00FF', '#FFFFFF', '#7B00FF'])(sub));
|
|
63
|
+
console.log();
|
|
64
|
+
|
|
65
|
+
// Separador RGB
|
|
66
|
+
const sep = '═'.repeat(64);
|
|
67
|
+
console.log(' ' + rgbCycle(sep, 0));
|
|
68
|
+
console.log();
|
|
69
|
+
|
|
70
|
+
// Caja de tecnologías
|
|
71
|
+
console.log(
|
|
72
|
+
boxen(
|
|
73
|
+
gradient(['#7B00FF', '#FFFFFF', '#7B00FF'])(' ⚡ TECNOLOGÍAS DISPONIBLES ⚡') + '\n\n' +
|
|
74
|
+
chalk.bold.white(' Frontend ') + chalk.gray('│ ') +
|
|
75
|
+
[
|
|
76
|
+
chalk.hex('#61DAFB')('React (Vite)'),
|
|
77
|
+
chalk.white('Next.js'),
|
|
78
|
+
chalk.hex('#42B883')('Vue'),
|
|
79
|
+
chalk.hex('#00DC82')('Nuxt'),
|
|
80
|
+
chalk.hex('#FF5D01')('Astro'),
|
|
81
|
+
chalk.hex('#FF3E00')('Svelte'),
|
|
82
|
+
chalk.hex('#4F8EF7')('Solid'),
|
|
83
|
+
chalk.hex('#DD0031')('Angular'),
|
|
84
|
+
chalk.hex('#E8F2FF')('Remix'),
|
|
85
|
+
chalk.hex('#AC7EF4')('Qwik'),
|
|
86
|
+
].join(chalk.gray(' · ')) + '\n\n' +
|
|
87
|
+
chalk.bold.white(' Backend ') + chalk.gray('│ ') +
|
|
88
|
+
[
|
|
89
|
+
chalk.hex('#68A063')('Express'),
|
|
90
|
+
chalk.hex('#E0234E')('NestJS'),
|
|
91
|
+
chalk.white('Fastify'),
|
|
92
|
+
chalk.hex('#E36002')('Hono'),
|
|
93
|
+
chalk.hex('#009688')('FastAPI'),
|
|
94
|
+
chalk.hex('#44B78B')('Django'),
|
|
95
|
+
chalk.gray('Flask'),
|
|
96
|
+
chalk.hex('#6DB33F')('Spring'),
|
|
97
|
+
chalk.white('Deno'),
|
|
98
|
+
chalk.hex('#00ADD8')('Go/Gin'),
|
|
99
|
+
].join(chalk.gray(' · ')),
|
|
100
|
+
{
|
|
101
|
+
padding: { top: 1, bottom: 1, left: 3, right: 3 },
|
|
102
|
+
margin: { left: 2 },
|
|
103
|
+
borderStyle: 'double',
|
|
104
|
+
borderColor: 'magenta',
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
console.log();
|
|
110
|
+
console.log(' ' + rgbCycle(sep, 8));
|
|
111
|
+
console.log();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
program
|
|
115
|
+
.name('novatec-cli')
|
|
116
|
+
.description('NOVATEC FULLSTACK CLI — Generador profesional de proyectos full stack')
|
|
117
|
+
.version('1.0.0', '-v, --version', 'Mostrar versión');
|
|
118
|
+
|
|
119
|
+
program
|
|
120
|
+
.command('create [name]')
|
|
121
|
+
.description('Crear un nuevo proyecto full stack')
|
|
122
|
+
.option('--frontend <type>', 'react | next | vue | nuxt | astro | svelte | solid | angular | remix | qwik')
|
|
123
|
+
.option('--backend <type>', 'express | nestjs | fastify | hono | fastapi | django | flask | spring | deno | gin')
|
|
124
|
+
.action(async (name, options) => {
|
|
125
|
+
await showBanner();
|
|
126
|
+
try {
|
|
127
|
+
await checkRequirements();
|
|
128
|
+
await runCreate(name, options);
|
|
129
|
+
} catch (err) {
|
|
130
|
+
console.error(
|
|
131
|
+
boxen(
|
|
132
|
+
chalk.red.bold('✖ ERROR\n\n') + chalk.white(err.message),
|
|
133
|
+
{ padding: 1, borderColor: 'red', borderStyle: 'round' }
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
if (!process.argv.slice(2).length) {
|
|
141
|
+
(async () => {
|
|
142
|
+
await showBanner();
|
|
143
|
+
program.outputHelp();
|
|
144
|
+
})();
|
|
145
|
+
} else {
|
|
146
|
+
program.parse(process.argv);
|
|
147
|
+
}
|