responsive-system 1.7.16 → 1.7.18

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.7.16",
3
+ "version": "1.7.18",
4
4
  "description": "Sistema de layout responsivo con auto-scaling para Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/responsive-system.cjs",
@@ -58,8 +58,6 @@
58
58
  "lint": "eslint .",
59
59
  "preview": "vite preview",
60
60
  "prepublishOnly": "npm run build",
61
- "install": "node scripts/postinstall.js",
62
- "postinstall": "node scripts/postinstall.js",
63
61
  "test:postinstall": "node scripts/test-postinstall.js"
64
62
  },
65
63
  "dependencies": {
@@ -25,6 +25,13 @@ const packageJsonPath = path.join(projectRoot, 'package.json')
25
25
  const scriptPath = fileURLToPath(import.meta.url)
26
26
  const isFromNodeModules = scriptPath.includes('node_modules') && scriptPath.includes('responsive-system')
27
27
 
28
+ // Detectar si se ejecuta con npx (ejecución interactiva)
29
+ // Cuando se ejecuta con npx, process.argv[1] contiene el path del script ejecutado
30
+ const isNpxExecution = process.argv[1] && (
31
+ process.argv[1].includes('responsive-system-setup') ||
32
+ process.argv[1].includes('postinstall.js')
33
+ )
34
+
28
35
  // Detectar CI/CD environments
29
36
  const isCI = !!(
30
37
  process.env.CI ||
@@ -82,15 +89,8 @@ let needsUpdate = false
82
89
 
83
90
  // Función para preguntar al usuario qué layout quiere
84
91
  async function askLayout() {
85
- // Si se ejecuta desde node_modules (npx responsive-system-setup), usar layout default
86
- // El usuario puede ejecutar npx responsive-system-setup nuevamente para cambiar el layout
87
- if (isFromNodeModules) {
88
- console.log(' ℹ️ Usando layout "default" por defecto')
89
- console.log(' 💡 Ejecuta "npx responsive-system-setup" nuevamente para cambiar el layout')
90
- return 'default'
91
- }
92
-
93
- // Si es ejecución manual, preguntar interactivamente
92
+ // Siempre preguntar interactivamente cuando se ejecuta con npx
93
+ // Solo usar default si no hay stdin disponible (CI/CD o ejecución no interactiva)
94
94
  const rl = readline.createInterface({
95
95
  input: process.stdin,
96
96
  output: process.stdout