astro-intl 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -13,6 +13,24 @@ Sistema de internacionalización simple y type-safe para Astro, inspirado en nex
13
13
 
14
14
  ## 📦 Instalación
15
15
 
16
+ ### Instalación automática (Recomendado)
17
+
18
+ Usa el CLI de Astro para instalar y configurar automáticamente:
19
+
20
+ ```bash
21
+ npx astro add astro-intl
22
+ ```
23
+
24
+ Este comando:
25
+
26
+ - ✅ Instala el paquete
27
+ - ✅ Agrega la integración a tu `astro.config.mjs`
28
+ - ✅ Configura las dependencias necesarias
29
+
30
+ ### Instalación manual
31
+
32
+ Si prefieres instalar manualmente:
33
+
16
34
  ```bash
17
35
  npm install astro-intl
18
36
  # o
@@ -21,9 +39,7 @@ pnpm add astro-intl
21
39
  yarn add astro-intl
22
40
  ```
23
41
 
24
- ## ⚙️ Configuración
25
-
26
- Agrega la integración en tu `astro.config.mjs`:
42
+ Luego agrega la integración en tu `astro.config.mjs`:
27
43
 
28
44
  ```js
29
45
  import { defineConfig } from "astro/config";
package/dist/index.js CHANGED
@@ -4,10 +4,18 @@ export default function myIntegration(options = {}) {
4
4
  return {
5
5
  name: "astro-intl",
6
6
  hooks: {
7
- "astro:config:setup": ({ logger }) => {
7
+ "astro:config:setup": ({ logger, updateConfig }) => {
8
8
  if (!enabled)
9
9
  return;
10
10
  logger.info("[astro-intl] loaded");
11
+ // Configuración para 'astro add'
12
+ updateConfig({
13
+ vite: {
14
+ optimizeDeps: {
15
+ include: ["astro-intl"],
16
+ },
17
+ },
18
+ });
11
19
  },
12
20
  },
13
21
  };
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "astro-intl",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "Sistema de internacionalización simple y type-safe para Astro, inspirado en next-intl",
6
6
  "keywords": [
7
7
  "astro",
8
8
  "astro-integration",
9
+ "astro-component",
10
+ "withastro",
9
11
  "i18n",
10
12
  "internationalization",
11
13
  "intl",