Skip to content

Commit

Permalink
Refactor dom bindings project (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
langovoi authored and diegomura committed Jan 19, 2018
1 parent 951a8f4 commit b149cfa
Show file tree
Hide file tree
Showing 17 changed files with 129 additions and 1,952 deletions.
1 change: 0 additions & 1 deletion .prettierignore
@@ -1 +0,0 @@
examples/dom-bindings
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -55,7 +55,13 @@ const MyDocument = () => (
```

### Render in DOM

**Note:** you need add `transform-loader` like [in example](/examples/dom-bindings/webpack.config.js#L16)

```jsx
// to fix "regeneratorRuntime is not defined", which causes by "@react-pdf/*"
// also you can use "babel-polyfill"
import 'regenerator-runtime/runtime';
import React from 'react';
import ReactDOM from 'react-dom';

Expand Down Expand Up @@ -88,7 +94,7 @@ For each example, try opening `output.pdf` to see the result.
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/examples/text/thumb.png">
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/examples/text/">Text</a>
</td>
</td>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/examples/images/thumb.png">
<br>
Expand All @@ -98,17 +104,17 @@ For each example, try opening `output.pdf` to see the result.
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/examples/resume/thumb.png">
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/examples/resume/">Resume</a>
</td>
</td>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/examples/fractals/thumb.png">
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/examples/fractals/">Fractals</a>
</td>
</td>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/examples/knobs/thumb.png">
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/examples/knobs/">Knobs</a>
</td>
</td>
</tr>
</tbody>
</table>
Expand Down
13 changes: 9 additions & 4 deletions examples/dom-bindings/.babelrc
@@ -1,7 +1,12 @@
{
presets: [
"es2015",
"react",
"stage-0"
"presets": [
[
"env",
{
"modules": false,
"loose": true
}
],
"react"
]
}
4 changes: 2 additions & 2 deletions examples/dom-bindings/.eslintrc
Expand Up @@ -6,13 +6,13 @@
"plugins": [],
"env": {
"es6" : true,
"browser" : true,
"browser" : true
},
"rules": {
"arrow-parens": 0,
"object-curly-newline": 0,
"react/jsx-filename-extension": 0,
"react/forbid-prop-types": 0,
"react/require-default-props": 0,
"react/require-default-props": 0
}
}
4 changes: 0 additions & 4 deletions examples/dom-bindings/.gitignore
Expand Up @@ -3,15 +3,11 @@
# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down

0 comments on commit b149cfa

Please sign in to comment.