Skip to content

Commit

Permalink
Merge pull request #16 from mtlewis/chore/v2.0.0
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
mtlewis authored Sep 19, 2018
2 parents 41b0069 + 73505ff commit 934cdc3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 2.0.0

## Breaking changes

- Switches to a single default export - before, it was necessary to configure babel to use `createElement`, and import the export of the same name from jsx-pdf. Now, babel should be configured to use `JsxPdf.createElement`, and the whole package should be imported. See the readme for more details and examples.
- Changes the integration point of the package. Previously pdfmake was a dependency, and the library handled creating the PDFKit document internally. However, this limits the ability of consumers to configure pdfmake in the way that they need to. We also only supported rendering PDFs in node, but pdfmake can actually render PDFs in a browser too. Now, we provide a renderPdf function that outputs the correct pdfmake format, and consumers need to handle importing pdfmake and passing the result of renderPdf to it.

# 1.0.0

- First semver release 🎉
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "jsx-pdf",
"version": "1.0.0",
"version": "2.0.0",
"main": "dst/index.js",
"description": "Generate modular PDFs using JSX.",
"files": [
"/dst",
"/fonts"
"/dst"
],
"author": "Yaroslav Borcheninov <[email protected]>",
"license": "MIT",
Expand All @@ -32,8 +31,7 @@
"demo": "node --require babel-register example/index.js"
},
"dependencies": {
"lodash": "^4.17.10",
"pdfmake": "^0.1.36"
"lodash": "^4.17.10"
},
"devDependencies": {
"babel-cli": "^6.26.0",
Expand All @@ -57,9 +55,11 @@
"jest": "^23.1.0",
"jest-watch-typeahead": "^0.1.0",
"pdf2json": "^1.1.7",
"pdfmake": "^0.1.36",
"prettier": "^1.9.2"
},
"peerDependencies": {
"babel-plugin-transform-react-jsx": "^6.0.0"
"babel-plugin-transform-react-jsx": "^6.0.0",
"pdfmake": "^0.1.36"
}
}

0 comments on commit 934cdc3

Please sign in to comment.