utn-cli 2.1.26 → 2.1.27
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/commands/frontend.js +10 -0
- package/package.json +1 -1
package/commands/frontend.js
CHANGED
|
@@ -55,6 +55,16 @@ export async function updateFrontend(opciones = { cerrarAlFinalizar: true }) {
|
|
|
55
55
|
// Copiar archivos base
|
|
56
56
|
copiarDirectorios(directoriodePlantillas, directorioDestino, archivosAExcluir);
|
|
57
57
|
|
|
58
|
+
// Copiar AccionesPersonalizadas.ts solo si no existe en el destino
|
|
59
|
+
const rutaAccionesDestino = path.join(directorioDestino, 'src', 'app', 'Paginas', 'contenedor-principal', 'AccionesPersonalizadas.ts');
|
|
60
|
+
if (!fs.existsSync(rutaAccionesDestino)) {
|
|
61
|
+
const rutaAccionesTemplate = path.join(directoriodePlantillas, 'src', 'app', 'Paginas', 'contenedor-principal', 'AccionesPersonalizadas.ts');
|
|
62
|
+
if (fs.existsSync(rutaAccionesTemplate)) {
|
|
63
|
+
fs.copyFileSync(rutaAccionesTemplate, rutaAccionesDestino);
|
|
64
|
+
console.log('AccionesPersonalizadas.ts no encontrado, se copió desde la plantilla.');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
58
68
|
// Merge de app.routes.ts
|
|
59
69
|
const rutaRoutesTemplate = path.join(directoriodePlantillas, 'src', 'app', 'app.routes.ts');
|
|
60
70
|
const rutaRoutesDestino = path.join(directorioDestino, 'src', 'app', 'app.routes.ts');
|