Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.81 KB

README.md

File metadata and controls

24 lines (18 loc) · 1.81 KB

MIT Version CI

i18next-utilities-ts-cli

A CLI tool to generate TypeScript types for i18next based on your resource files. Point it to your default locale and it will generate types from .json, .yaml, or .yml files.

Usage

npx i18next-utilities-ts-cli gen -i ./path/to/locales/en-GB -o ./i18next.d.ts

Options

Option Type Default Description
-i, --input string The input directory for the default locale.
-o, --output string The output file for the generated types.
-l, --default-locale string The default locale for the resource files.
-g, --glob string[] ["**/*.json","**/*.yml","**/*.yaml"] The glob pattern to match the resource files.
-n, --namespace-resolution "basename", "relativePath" "basename" The resolution strategy for the namespace.
-d, --default-namespace string "translation" The default namespace for the resource files.