-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update readme after extractor changes that removes limitations
- Loading branch information
Christoffer Jahren
committed
Apr 20, 2023
1 parent
e23cbc0
commit 1f15413
Showing
6 changed files
with
68 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Vue.js extractor | ||
|
||
The `@lingui/extractor-vue` package provides a [custom extractor](../guides/custom-extractor.md) that handles Vue.js files. | ||
|
||
## Installation | ||
|
||
```bash npm2yarn | ||
npm install --save-dev @lingui/extractor-vue | ||
``` | ||
|
||
## Usage | ||
|
||
It is required that you use JavaScript for your Lingui configuration. | ||
|
||
```js | ||
import { vueExtractor } from "@lingui/extractor-vue" | ||
import babel from "@lingui/cli/api/extractors/babel" | ||
|
||
const linguiConfig = { | ||
locales: ["en", "nb"], | ||
sourceLocale: "en", | ||
catalogs: [ | ||
{ | ||
path: "<rootDir>/src/{locale}", | ||
include: ["<rootDir>/src"], | ||
}, | ||
], | ||
extractors: [babel, vueExtractor], | ||
} | ||
|
||
export default linguiConfig | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters