responsive-system 1.0.2 → 1.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "responsive-system",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Sistema de layout responsivo con auto-scaling para Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/responsive-system.cjs",
@@ -46,8 +46,9 @@ if (!hasReact) {
46
46
  needsInstall = true
47
47
  }
48
48
 
49
- if (!hasTailwind) {
50
- // Instalar como devDependencies para que npx funcione
49
+ // Siempre instalar Tailwind en el proyecto raíz (aunque esté en responsive-system)
50
+ // Esto asegura que npx tailwindcss funcione
51
+ if (!hasTailwind || !fs.existsSync(path.join(projectRoot, 'node_modules', 'tailwindcss'))) {
51
52
  packagesToInstall.push('tailwindcss@^4.1.14', 'postcss@^8.5.6', 'autoprefixer@^10.4.21')
52
53
  needsInstall = true
53
54
  }
@@ -80,8 +81,9 @@ if (needsInstall && packagesToInstall.length > 0) {
80
81
  }
81
82
 
82
83
  // Instalar TypeScript y Tailwind como devDependencies (para que npx funcione)
84
+ // Usar --force para asegurar que se instalen en el proyecto raíz
83
85
  if (devPackages.length > 0) {
84
- execSync(`npm install ${devPackages.join(' ')} --save-dev`, {
86
+ execSync(`npm install ${devPackages.join(' ')} --save-dev --force`, {
85
87
  stdio: 'inherit',
86
88
  cwd: projectRoot
87
89
  })