Skip to content

Commit

Permalink
docs: cli ref
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Feb 16, 2024
1 parent f66ea43 commit a2884d4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions website/docs/ref/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,24 @@
{
"scripts": {
"extract": "lingui extract",
"compile": "lingui compile --typescript"
"compile": "lingui compile"
}
}
```

:::tip
If you use TypeScript, you can add `--typescript` flag to `compile` script to produce compiled message catalogs with TypeScript types.

```json title="package.json"
{
"scripts": {
"compile": "lingui compile --typescript"
}
}
```

:::

## Global options

### `--config <config>`
Expand Down Expand Up @@ -58,7 +71,7 @@ lingui extract src/components
Will extract only messages from `src/components/**/*` files, you can also pass multiple paths.
It's useful if you want to run extract command on files that are staged, using for example `husky`, before commiting will extract messages from staged files:
It's useful if you want to run extract command on files that are staged, using for example `husky`, before committing will extract messages from staged files:
```json title="package.json"
{
Expand Down

0 comments on commit a2884d4

Please sign in to comment.