@dropi/ui 0.1.31 → 0.1.33
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/setup.js +11 -6
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -374,20 +374,25 @@ dropi-icon:not(.hydrated) {
|
|
|
374
374
|
if (!fs.existsSync(destDir)) fs.mkdirSync(destDir, { recursive: true });
|
|
375
375
|
try {
|
|
376
376
|
if (fs.existsSync(dest)) {
|
|
377
|
-
// Si es un directorio y existe, no hacemos symlink directo, pero aquí tratamos archivos o carpetas simples
|
|
378
377
|
if (fs.lstatSync(dest).isSymbolicLink() || fs.existsSync(dest)) fs.unlinkSync(dest);
|
|
379
378
|
}
|
|
380
379
|
fs.symlinkSync(src, dest, fs.lstatSync(src).isDirectory() ? 'dir' : 'file');
|
|
381
380
|
log(`Assets configurados: ${destRelativePath} (Symlink ✅)`, 'ok');
|
|
382
381
|
} catch (e) {
|
|
383
382
|
// Fallback a copia recursiva
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
383
|
+
try {
|
|
384
|
+
if (fs.lstatSync(src).isDirectory()) {
|
|
385
|
+
fs.cpSync ? fs.cpSync(src, dest, { recursive: true }) : execSync(`cp -R "${src}" "${dest}"`);
|
|
386
|
+
} else {
|
|
387
|
+
fs.copyFileSync(src, dest);
|
|
388
|
+
}
|
|
389
|
+
log(`Assets copiados: ${destRelativePath} (Copia ✅)`, 'ok');
|
|
390
|
+
} catch (copyErr) {
|
|
391
|
+
log(`Assets no encontrados: ${destRelativePath}. Cópialos manualmente desde node_modules/@dropi/ui/${srcRelativePath}`, 'warn');
|
|
388
392
|
}
|
|
389
|
-
log(`Assets copiados: ${destRelativePath} (Copia ✅)`, 'ok');
|
|
390
393
|
}
|
|
394
|
+
} else {
|
|
395
|
+
log(`Assets no encontrados en node_modules: ${srcRelativePath}. Verifica que @dropi/ui esté instalado correctamente.`, 'warn');
|
|
391
396
|
}
|
|
392
397
|
};
|
|
393
398
|
|