ngx-i18n-combine
In progress...
Install
npm install --save @angular-ru/ngx-i18n-combine
Usage
Add an combine
script to your project's package.json
:
"combine": {
"combine": "ngx-i18n-combine -i ./src/i18n/ -o ./src/assets/i18n/"
}
or
You can now run npm run combine
to combine files.
Examples
Combine from multiple dirs
ngx-i18n-combine -i ./src/sub1/i18n/ ./src/sub2/i18n/ -o ./src/assets/i18n/
Combine and save to multiple files
ngx-i18n-combine -i ./src/**/i18n/ -o ./src/assets/i18n/ -f ts -l en,fr,es
CLI
Usage:
ngx-i18n-combine [options]
Options:
--version, -v Show version number [boolean]
--help, -h Show help [boolean]
--input, -i Paths you would like to extract files from.
You can use path expansion,
glob patterns and multiple paths [array]
[default: current working path]
--output, -o Paths where you would like to save merged files.
You can use path expansion,
glob patterns and multiple paths
[array] [required]
--format, -f Files format [string]
[choices: "json", "js", "ts", "tsx", "jsx"]
[default: "json"]
--locales, -l Locale names [array] [default: "*"]
--sort, -s Sort strings in alphabetical order when saving
[boolean] [default: false]
--minify, -m Minify strings in output files
[boolean] [default: false]
--verbose, -vb If true, prints all processed file paths to console
[boolean] [default: true]