@icarusmx/creta 0.1.1 → 0.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/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 +3 -3
- package/templates/sveltekit-portfolio/src/routes/+page.svelte +2 -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"
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<nav class="bg-white shadow-sm">
|
|
48
48
|
<div class="max-w-7xl mx-auto px-4">
|
|
49
49
|
<div class="flex justify-between items-center py-3">
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
[Logo/Nombre aquí]
|
|
51
|
+
[Menú aquí]
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
</nav>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<footer class="bg-gray-50 border-t">
|
|
83
83
|
<div class="max-w-7xl mx-auto py-8 px-4">
|
|
84
84
|
<div class="text-center text-gray-600 text-sm">
|
|
85
|
-
|
|
85
|
+
[Tu contenido aquí]
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
</footer>
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
-->
|
|
34
34
|
|
|
35
35
|
<svelte:head>
|
|
36
|
-
<title>{{STUDENT_NAME}} -
|
|
37
|
-
<meta name="description" content="
|
|
36
|
+
<title>{{STUDENT_NAME}} - Portafolio</title>
|
|
37
|
+
<meta name="description" content="Portafolio personal de {{STUDENT_NAME}}" />
|
|
38
38
|
</svelte:head>
|
|
39
39
|
|
|
40
40
|
<section class="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100">
|