@icarusmx/creta 0.1.0 → 0.2.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/bin/creta.js +12 -12
- package/package.json +1 -1
- package/templates/sveltekit-portfolio/package.json +1 -3
- package/templates/sveltekit-portfolio/src/routes/+layout.svelte +4 -0
- package/templates/sveltekit-portfolio/src/routes/+page.svelte +4 -2
- package/templates/sveltekit-portfolio/vite.config.js +2 -1
- package/templates/sveltekit-portfolio/postcss.config.js +0 -6
- package/templates/sveltekit-portfolio/tailwind.config.js +0 -8
package/bin/creta.js
CHANGED
|
@@ -8,27 +8,27 @@ import path from 'path'
|
|
|
8
8
|
const args = process.argv.slice(2)
|
|
9
9
|
const command = args[0]
|
|
10
10
|
|
|
11
|
-
console.log("¡Bienvenido
|
|
12
|
-
console.log("
|
|
11
|
+
console.log("¡Bienvenido de vuelta! 🏛️")
|
|
12
|
+
console.log("Retomemos desde donde nos quedamos: hagamos tu portafolio.\n")
|
|
13
13
|
|
|
14
14
|
if (!command) {
|
|
15
15
|
console.log("Comandos disponibles:")
|
|
16
|
-
console.log(" creta
|
|
17
|
-
console.log(" creta
|
|
18
|
-
console.log(" creta
|
|
19
|
-
console.log(" creta
|
|
16
|
+
console.log(" creta portafolio - Crea tu portafolio personal (reto completo)")
|
|
17
|
+
console.log(" creta portafolio-1 - Portafolio con navbar hecho")
|
|
18
|
+
console.log(" creta portafolio-2 - Portafolio con navbar + hero")
|
|
19
|
+
console.log(" creta portafolio-3 - Portafolio completo (solución)")
|
|
20
20
|
process.exit(0)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
if (command.startsWith('
|
|
24
|
-
const level = command === '
|
|
25
|
-
await
|
|
23
|
+
if (command.startsWith('portafolio')) {
|
|
24
|
+
const level = command === 'portafolio' ? 0 : parseInt(command.split('-')[1]) || 0
|
|
25
|
+
await createPortfolioProject(level)
|
|
26
26
|
} else {
|
|
27
27
|
console.log(`Comando no reconocido: ${command}`)
|
|
28
28
|
process.exit(1)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
async function
|
|
31
|
+
async function createPortfolioProject(level) {
|
|
32
32
|
const rl = createInterface({
|
|
33
33
|
input: process.stdin,
|
|
34
34
|
output: process.stdout
|
|
@@ -42,7 +42,7 @@ async function createWebsiteProject(level) {
|
|
|
42
42
|
|
|
43
43
|
try {
|
|
44
44
|
const name = await askQuestion("¿Cuál es tu nombre? ")
|
|
45
|
-
const projectName = `${name.toLowerCase().replace(/\s+/g, '-')}-
|
|
45
|
+
const projectName = `${name.toLowerCase().replace(/\s+/g, '-')}-portafolio`
|
|
46
46
|
|
|
47
47
|
console.log(`\n🚀 Creando proyecto: ${projectName}`)
|
|
48
48
|
console.log(`📚 Nivel: ${level === 0 ? 'Reto completo' : `Con ${getLevelDescription(level)} completado`}`)
|
|
@@ -211,7 +211,7 @@ function getLevelDescription(level) {
|
|
|
211
211
|
const descriptions = {
|
|
212
212
|
1: 'navbar',
|
|
213
213
|
2: 'navbar + hero',
|
|
214
|
-
3: 'todo el
|
|
214
|
+
3: 'todo el portafolio'
|
|
215
215
|
}
|
|
216
216
|
return descriptions[level] || 'nivel desconocido'
|
|
217
217
|
}
|
package/package.json
CHANGED
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
"@sveltejs/adapter-auto": "^3.0.0",
|
|
12
12
|
"@sveltejs/kit": "^2.0.0",
|
|
13
13
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
14
|
-
"autoprefixer": "^10.4.16",
|
|
15
|
-
"postcss": "^8.4.32",
|
|
16
14
|
"svelte": "^5.0.0",
|
|
17
|
-
"tailwindcss": "^
|
|
15
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
18
16
|
"vite": "^5.0.3"
|
|
19
17
|
},
|
|
20
18
|
"type": "module"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
- Usa 'hover:text-blue-600' para efectos hover
|
|
44
44
|
|
|
45
45
|
ESTRUCTURA SUGERIDA:
|
|
46
|
+
```html
|
|
46
47
|
<nav class="bg-white shadow-sm">
|
|
47
48
|
<div class="max-w-7xl mx-auto px-4">
|
|
48
49
|
<div class="flex justify-between items-center py-3">
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
</div>
|
|
52
53
|
</div>
|
|
53
54
|
</nav>
|
|
55
|
+
```
|
|
54
56
|
-->
|
|
55
57
|
|
|
56
58
|
<nav class="bg-white shadow-sm">
|
|
@@ -76,6 +78,7 @@
|
|
|
76
78
|
- Usa 'text-center text-gray-600 text-sm' para texto centrado y gris
|
|
77
79
|
|
|
78
80
|
ESTRUCTURA SUGERIDA:
|
|
81
|
+
```html
|
|
79
82
|
<footer class="bg-gray-50 border-t">
|
|
80
83
|
<div class="max-w-7xl mx-auto py-8 px-4">
|
|
81
84
|
<div class="text-center text-gray-600 text-sm">
|
|
@@ -83,6 +86,7 @@
|
|
|
83
86
|
</div>
|
|
84
87
|
</div>
|
|
85
88
|
</footer>
|
|
89
|
+
```
|
|
86
90
|
-->
|
|
87
91
|
|
|
88
92
|
<footer class="bg-gray-50 border-t">
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
- Usa 'bg-blue-600 hover:bg-blue-700 text-white px-8 py-3 rounded-lg' para botones
|
|
16
16
|
|
|
17
17
|
ESTRUCTURA SUGERIDA:
|
|
18
|
+
```html
|
|
18
19
|
<section class="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100">
|
|
19
20
|
<div class="max-w-4xl mx-auto px-4 text-center">
|
|
20
21
|
<h1 class="text-4xl md:text-6xl font-bold text-gray-900 mb-6">
|
|
@@ -28,11 +29,12 @@
|
|
|
28
29
|
</a>
|
|
29
30
|
</div>
|
|
30
31
|
</section>
|
|
32
|
+
```
|
|
31
33
|
-->
|
|
32
34
|
|
|
33
35
|
<svelte:head>
|
|
34
|
-
<title>{{STUDENT_NAME}} -
|
|
35
|
-
<meta name="description" content="
|
|
36
|
+
<title>{{STUDENT_NAME}} - Portafolio</title>
|
|
37
|
+
<meta name="description" content="Portafolio personal de {{STUDENT_NAME}}" />
|
|
36
38
|
</svelte:head>
|
|
37
39
|
|
|
38
40
|
<section class="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100">
|