Skip to content

Commit

Permalink
Add extractComments option to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys committed Oct 27, 2017
1 parent e1441ad commit 64d50f0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,31 @@ export const test = defineMessages({
If includeExportName is `'all'`, it will also add `default` to the id on default
exports.

#### extractComments

Use leading comments as the message description

Type: `boolean` <br>
Default: `false`

##### Example

```js
export const test = defineMessages({
// Message used to greet the user
hello: 'hello {name}',
})

↓ ↓ ↓ ↓ ↓ ↓

export const test = defineMessages({
hello: {
id: 'path.to.file.test.hello',
defaultMessage: 'hello {name}',
description: 'Message used to greet the user',
},
})
```

### Support variable

Expand Down

0 comments on commit 64d50f0

Please sign in to comment.