Skip to content

Commit

Permalink
update readme to align example with create-react-app usecases
Browse files Browse the repository at this point in the history
  • Loading branch information
robindemourat committed Apr 16, 2019
1 parent 701577a commit 8b43e49
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ Bibliography.propTypes = {


```js
const style = require('raw!./my-csl-style.csl');
const locale = require('raw!./my-xml-locale.xml');
/**
* fetch csl and xml data as strings with your prefered method
* /
import raw from 'raw.macro'
const style = raw('my-csl-style.csl');
const locale = raw('my-xml-locale.xml');
/**
* example of item data
Expand Down Expand Up @@ -123,8 +128,44 @@ ReferencesManager.propTypes = {
## Example

```js
const style = require('raw!./my-csl-style.csl');
const locale = require('raw!./my-xml-locale.xml');
/**
* fetch csl and xml data as strings with your prefered method
* /
import raw from 'raw.macro'
const style = raw('my-csl-style.csl');
const locale = raw('my-xml-locale.xml');
/**
* example of item data
{
"Item-1": {
"id": "Item-1",
"type": "book",
"title": "Digital Typography",
"publisher": "Center for the Study of Language and Information",
"number-of-pages": "685",
"source": "Amazon.com",
"ISBN": "1575860104",
"author": [
{
"family": "Knuth",
"given": "Donald E."
}
],
"issued": {
"date-parts": [
[
"1998",
6,
1
]
]
}
}
}
*/

/**
* example of citation data
Expand Down

0 comments on commit 8b43e49

Please sign in to comment.