open-index/open-npm huggingface dataset:
npm package: @i18n-micro/types-generator
Description: Type generator for i18n-micro translation keys
Author: s00d
Latest version: 1.1.1

# @i18n-micro/types-generator

Type generator for i18n-micro translation keys. Automatically generates TypeScript types from JSON translation files.

## Installation

```bash
npm install -D @i18n-micro/types-generator
# or
pnpm add -D @i18n-micro/types-generator
# or
yarn add -D @i18n-micro/types-generator
```

## Usage

### Nuxt

Add to `nuxt.config.ts`:

```typescript
export default defineNuxtConfig({
  modules: [
    'nuxt-i18n-micro',
    '@i18n-micro/types-generator/nuxt',
  ],
})
```

### Vite/Vue

Add to `vite.config.ts`:

```typescript
import { I18nTypesPlugin } from '@i18n-micro/types-generator'

export default defineConfig({
  plugins: [
    I18nTypesPlugin({
      srcDir: 'src',
      translationDir: 'locales',
    }),
  ],
})
```

## Features

- 🔍 Automatic type generation from JSON files
- ✅ Full type safety for translation keys
- 🎯 IDE autocomplete support
- 🔄 Hot reload on file changes
- 🚀 Zero runtime overhead

## Documentation

See [full documentation](../../docs/integrations/types-generator.md) for detailed usage and examples.

## License

MIT