i18next-utilities-ts-cli

1.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i i18next-utilities-ts-cli

Weekly Downloads

9

Version

1.0.4

License

MIT

Unpacked Size

14.4 kB

Total Files

13

Last publish

Collaborators

  • rowellx68