responsive-system 1.0.2 → 1.0.4

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.4",
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,7 +46,12 @@ if (!hasReact) {
46
46
  needsInstall = true
47
47
  }
48
48
 
49
- if (!hasTailwind) {
49
+ // Siempre instalar Tailwind en el proyecto raíz (aunque esté en responsive-system)
50
+ // Verificar específicamente en node_modules del proyecto raíz y en devDependencies
51
+ const tailwindInRoot = fs.existsSync(path.join(projectRoot, 'node_modules', 'tailwindcss'))
52
+ const tailwindInDevDeps = packageJson.devDependencies && packageJson.devDependencies.tailwindcss
53
+
54
+ if (!tailwindInRoot || !tailwindInDevDeps) {
50
55
  // Instalar como devDependencies para que npx funcione
51
56
  packagesToInstall.push('tailwindcss@^4.1.14', 'postcss@^8.5.6', 'autoprefixer@^10.4.21')
52
57
  needsInstall = true
@@ -80,8 +85,9 @@ if (needsInstall && packagesToInstall.length > 0) {
80
85
  }
81
86
 
82
87
  // Instalar TypeScript y Tailwind como devDependencies (para que npx funcione)
88
+ // Usar --force para asegurar que se instalen en el proyecto raíz
83
89
  if (devPackages.length > 0) {
84
- execSync(`npm install ${devPackages.join(' ')} --save-dev`, {
90
+ execSync(`npm install ${devPackages.join(' ')} --save-dev --force`, {
85
91
  stdio: 'inherit',
86
92
  cwd: projectRoot
87
93
  })