@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/setup.js +11 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dropi/ui",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "Dropi Design System — Web Components for Angular, React and Vue",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
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
- 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);
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