JSPM

  • Created
  • Published
  • Downloads 298593
  • Score
    100M100P100Q167207F
  • License MIT

CLI for working wit message catalogs

Package Exports

  • @lingui/cli/api
  • @lingui/cli/api/compile
  • @lingui/cli/api/extract
  • @lingui/cli/api/stats

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lingui/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.