responsive-system 1.0.1 → 1.0.2

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.1",
3
+ "version": "1.0.2",
4
4
  "description": "Sistema de layout responsivo con auto-scaling para Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/responsive-system.cjs",
@@ -25,10 +25,18 @@ if (!fs.existsSync(packageJsonPath)) {
25
25
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
26
26
  const deps = { ...packageJson.dependencies, ...packageJson.devDependencies }
27
27
 
28
- // Verificar si React está instalado
29
- const hasReact = deps.react || fs.existsSync(path.join(projectRoot, 'node_modules', 'react'))
30
- const hasTailwind = deps.tailwindcss || fs.existsSync(path.join(projectRoot, 'node_modules', 'tailwindcss'))
31
- const hasTypeScript = deps.typescript || fs.existsSync(path.join(projectRoot, 'node_modules', 'typescript'))
28
+ // Verificar si React está instalado (solo en proyecto raíz, no en subdirectorios)
29
+ const hasReact = (packageJson.dependencies && packageJson.dependencies.react) ||
30
+ (packageJson.devDependencies && packageJson.devDependencies.react) ||
31
+ fs.existsSync(path.join(projectRoot, 'node_modules', 'react'))
32
+
33
+ const hasTailwind = (packageJson.dependencies && packageJson.dependencies.tailwindcss) ||
34
+ (packageJson.devDependencies && packageJson.devDependencies.tailwindcss) ||
35
+ fs.existsSync(path.join(projectRoot, 'node_modules', 'tailwindcss'))
36
+
37
+ const hasTypeScript = (packageJson.dependencies && packageJson.dependencies.typescript) ||
38
+ (packageJson.devDependencies && packageJson.devDependencies.typescript) ||
39
+ fs.existsSync(path.join(projectRoot, 'node_modules', 'typescript'))
32
40
 
33
41
  let needsInstall = false
34
42
  const packagesToInstall = []