lingui command line library for manipulating message catalogues
@lingui/cli
is part of LinguiJS. See the documentation for all information, tutorials and examples.
The library can be installed globally or locally using yarn
or npm
. The recommended way is installing the package locally. This ensures that everyone who uses the project has the same version and does not need to install additional packages.
npm install --save-dev @lingui/cli
# or using yarn
yarn add --dev @lingui/cli
To run the library locally there are three options, with the first one been recommended one.
Add these scripts to your package.json
.
{
"scripts": {
"extract": "lingui extract",
"compile": "lingui compile"
}
}
Then you can use:
npm run extract
npm run compile
You can run the scripts directly using a tool for executing Node packages NPX
. NPX
is included in NPM
version 5.2 and higher.
npx lingui extract
npx lingui compile
You can run commands directly from node_modules
folder.
node_modules/.bin/lingui extract
node_modules/.bin/lingui compile
See the reference documentation.
This package is licensed under MIT license.