0.1.3 • Published 1 year ago
@tmsg/x v0.1.3
@tmsg/x
@tmsg/x
is the command line interface (CLI) for the tmsg internationalization (i18n) library for TypeScript apps.
Installation
To use @tmsg/x
, install the package:
npm i @tmsg/x --save-dev
Usage
The @tmsg/x
CLI can be used to automatically extract strings from your codebase and export them to JSON files, as well as compile translations back to JavaScript:
# Extracts strings from the code base to JSON files.
tmsgx sync --outDir ./locales --projectDir . --locales en de
# Compile translations to ESM.
tmsgx compile --outDir ./dist/locales --localesDir ./locales