@dropi/ui 0.1.25 → 0.1.26

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 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dropi/ui",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
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
@@ -80,23 +80,27 @@ async function run() {
80
80
  const pkgMgr = getPkgMgr();
81
81
  const installCmd = pkgMgr === 'yarn' ? 'yarn add' : pkgMgr === 'pnpm' ? 'pnpm add' : 'npm install';
82
82
 
83
- if ((isReact || isNextJs) && !hasDep('@dropi/ui-react')) {
84
- log(`Instalando @dropi/ui-react...`);
83
+ if ((isReact || isNextJs) && (!hasDep('@dropi/ui') || !hasDep('@dropi/ui-react'))) {
84
+ const toInstall = [
85
+ !hasDep('@dropi/ui') ? '@dropi/ui' : null,
86
+ !hasDep('@dropi/ui-react') ? '@dropi/ui-react' : null,
87
+ ].filter(Boolean).join(' ');
88
+ log(`Instalando ${toInstall}...`);
85
89
  try {
86
- execSync(`${installCmd} @dropi/ui-react`, { stdio: 'inherit', cwd: projectRoot });
87
- log('@dropi/ui-react instalado.', 'ok');
90
+ execSync(`${installCmd} ${toInstall}`, { stdio: 'inherit', cwd: projectRoot });
91
+ log(`${toInstall} instalado.`, 'ok');
88
92
  } catch (e) {
89
- log('Error instalando @dropi/ui-react. Intenta instalarlo manualmente.', 'warn');
93
+ log(`Error instalando ${toInstall}. Intenta instalarlo manualmente.`, 'warn');
90
94
  }
91
95
  }
92
96
 
93
97
  if (isNextJsSsr && !hasDep('@stencil/ssr')) {
94
98
  log('Next.js SSR → Instalando @stencil/ssr...');
95
99
  try {
96
- execSync(`${installCmd} --save-dev @stencil/ssr`, { stdio: 'inherit', cwd: projectRoot });
100
+ execSync(`${installCmd} --save-dev @stencil/ssr --legacy-peer-deps`, { stdio: 'inherit', cwd: projectRoot });
97
101
  log('@stencil/ssr instalado.', 'ok');
98
102
  } catch (e) {
99
- log('Error instalando @stencil/ssr. Intenta instalarlo manualmente.', 'warn');
103
+ log('Error instalando @stencil/ssr. Intenta instalarlo manualmente: npm install --save-dev @stencil/ssr --legacy-peer-deps', 'warn');
100
104
  }
101
105
  }
102
106