@lingui/cli

CLI for working wit message catalogs

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
3,10125Jun 19, 2021Jan 17, 2017Minified + gzip package size for @lingui/cli in KB

Readme

License Version Downloads

@lingui/cli

lingui command line library for manipulating message catalogues

@lingui/cli is part of LinguiJS. See the documentation for all information, tutorials and examples.

Installation

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.

1) Add commands to scripts

Add these scripts to your package.json.

{
  "scripts": {
    "extract": "lingui extract",
    "compile": "lingui compile"
  }
}

Then you can use:

npm run extract
npm run compile

2) Use NPX

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

3) Run commands directly

You can run commands directly from node_modules folder.

node_modules/.bin/lingui extract
node_modules/.bin/lingui compile

Usage

See the tutorial or reference documentation.

License

This package is licensed under MIT license.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.