responsive-system 1.7.9 → 1.7.10
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/package.json +1 -1
- package/scripts/postinstall.js +18 -16
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -484,26 +484,28 @@ if (needsUpdate) {
|
|
|
484
484
|
console.log('✅ Todas las dependencias ya están en package.json')
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
//
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
487
|
+
// Función async para manejar la configuración del proyecto
|
|
488
|
+
(async () => {
|
|
489
|
+
// Verificar que fs.existsSync esté disponible
|
|
490
|
+
if (typeof fs.existsSync !== 'function') {
|
|
491
|
+
console.error('❌ Error: fs.existsSync no está disponible')
|
|
492
|
+
process.exit(1)
|
|
493
|
+
}
|
|
491
494
|
|
|
492
|
-
//
|
|
493
|
-
const
|
|
495
|
+
// Verificar si el proyecto ya está configurado
|
|
496
|
+
const mainTsxPath = path.join(projectRoot, 'src', 'main.tsx')
|
|
497
|
+
const layoutsDir = path.join(projectRoot, 'src', 'layouts')
|
|
498
|
+
const viteConfigPath = path.join(projectRoot, 'vite.config.ts')
|
|
499
|
+
|
|
500
|
+
let isAlreadyConfigured = false
|
|
494
501
|
try {
|
|
495
|
-
|
|
502
|
+
isAlreadyConfigured = fs.existsSync(mainTsxPath) &&
|
|
503
|
+
fs.existsSync(layoutsDir) &&
|
|
504
|
+
fs.existsSync(viteConfigPath)
|
|
496
505
|
} catch (e) {
|
|
497
|
-
|
|
506
|
+
console.error('❌ Error al verificar archivos existentes:', e.message)
|
|
507
|
+
isAlreadyConfigured = false
|
|
498
508
|
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
const isAlreadyConfigured = fileExists(mainTsxPath) &&
|
|
502
|
-
fileExists(layoutsDir) &&
|
|
503
|
-
fileExists(viteConfigPath)
|
|
504
|
-
|
|
505
|
-
// Función async para manejar la configuración del proyecto
|
|
506
|
-
(async () => {
|
|
507
509
|
|
|
508
510
|
// Si el proyecto está vacío, crear estructura base
|
|
509
511
|
if (isProjectEmpty) {
|