-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from mtlewis/chore/v2.0.0
v2.0.0
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 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
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 🎉 |
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 |
---|---|---|
@@ -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", | ||
|
@@ -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", | ||
|
@@ -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" | ||
} | ||
} |