Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jxnblk/repng
React component to PNG converter
https://github.com/jxnblk/repng
component image png png-converter puppeteer react
Last synced: about 1 month ago
JSON representation
React component to PNG converter
- Host: GitHub
- URL: https://github.com/jxnblk/repng
- Owner: jxnblk
- Archived: true
- Created: 2016-11-07T00:03:23.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-10-31T14:14:24.000Z (about 3 years ago)
- Last Synced: 2024-09-18T20:33:54.684Z (about 2 months ago)
- Topics: component, image, png, png-converter, puppeteer, react
- Language: JavaScript
- Homepage:
- Size: 602 KB
- Stars: 890
- Watchers: 16
- Forks: 60
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# repng
React component to PNG converter, built with [Puppeteer][puppeteer]
![](examples/repng.png)
```sh
npm i -g repng
``````sh
repng Icon.js --width 512 --height 512 --out-dir assets
``````
Usage
$ repngOptions
-d --out-dir Directory to save file to
-f --filename Specify a custom output filename
-w --width Width of image
-h --height Height of image
-p --props Props in JSON format (or path to JSON file) to pass to the React component
-t --type Type of output (png default) (pdf, jpeg or png)
--css Path to CSS file to include
--webfont Path to custom webfont for rendering
--puppeteer Options for Puppeteer in JSON format
```### Related
- [Puppeteer][puppeteer]
MIT License
[puppeteer]: https://github.com/GoogleChrome/puppeteer