Skip to content
/ repng Public
forked from SindreSvendby/repng

React component to PNG converter

Notifications You must be signed in to change notification settings

kanna99o/repng

 
 

Repository files navigation

repng

React component to PNG converter, built with Puppeteer

npm i -g repng
repng Icon.js --width 512 --height 512 --out-dir assets
Usage
  $ repng <ReactComponent>

Options
  -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
  -s --scale      Scale factor of the image
  -p --props      Props in JSON format to pass to the React component
  -u --puppeteer  Props in JSON format to pass to `puppeteer.launch`
  --css           Path to CSS file to include
  --webfont       Path to custom webfont for rendering

CSS-in-JS Support

The CLI detect if your are using this in a repo that is using emotion or styled-component. If you need this support also for the Node API you need to pass in an argument cssLibrary with the key value emotion or styled-component.

Related

MIT License

About

React component to PNG converter

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%