https://github.com/ttypic/react-intl-cli
React-Intl CLI for your React project
https://github.com/ttypic/react-intl-cli
Last synced: 4 months ago
JSON representation
React-Intl CLI for your React project
- Host: GitHub
- URL: https://github.com/ttypic/react-intl-cli
- Owner: ttypic
- License: mit
- Created: 2020-05-08T09:37:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T17:01:57.000Z (over 3 years ago)
- Last Synced: 2025-02-13T03:49:20.231Z (over 1 year ago)
- Language: JavaScript
- Size: 203 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# React-Intl CLI for your React App
[](https://github.com/ttypic/react-intl-cli/actions)
[](https://codecov.io/gh/ttypic/react-intl-cli)
[](https://www.npmjs.com/package/react-intl-cli)
[](https://www.npmjs.com/package/react-intl-cli)
[](https://www.npmjs.com/package/react-intl-cli)
`react-intl-cli` - command line tools for manipulating
[react-intl](https://formatjs.io/docs/react-intl/) message catalogues.
## Installation
You can install `react-intl-cli` globally or locally.
### Global Installation
Using npm:
```shell script
npm install --global react-intl-cli
```
Using yarn:
```shell script
yarn global add react-intl-cli
```
### Local Installation
Install package using npm or yarn:
```shell script
npm install --save-dev react-intl-cli
```
Add script to your `package.json` file:
```json
{
"scripts": {
"extract-translations": "react-intl-cli extract"
}
}
```
## Usage
For now `react-intl-cli` provides the only `extarct` command.
### Extract command
Extracts messages from source files and creates a message catalog for each language.
If you install `react-intl-cli` globally you could run it in your command line:
```shell script
react-intl-cli extract
```
or with custom options:
```shell script
react-intl-cli extract [option] [glob-patterns...]
```
to show available options run help:
```shell script
react-intl-cli extract -h
```
If you install locally just run:
```shell script
npm run extract-translations
```
## License
This package is licensed under MIT license.