🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

jsx2jpg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx2jpg

![](https://www.politico.com/interactives/cdn/images/badge.svg)

npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

⚛️ jsx2jpg 🖼️

A tool for taking screenshots of JSX component files.

Quick Start

Install the library

$ npm install -g jsx2jpg

Use the library

$ jsx2jpg snap App.jsx

See Examples below for more.

CLI Reference

Snap

$ jsx2jpg snap --help
jsx2jpg snap <component> [context]

Takes a screenshot of a component.

Positionals:
  component   A path to a JSX file.                          [string] [required]
  context, c  A path to an importable data file.                        [string]

Options:
  --version           Show version number                              [boolean]

  --help              Show help                                        [boolean]

  --size, -s          A sizing string for width/height
                                                   [string] [default: "600x325"]

  --destination, -o   The destination directory          [string] [default: pwd]

  --quality, -q       The quality (from 0 to 100)        [number] [default: 100]

  --resolution, -r    A resolution multiplier              [number] [default: 1]

  --fileAccessor, -a  Accessor for filename if multiple contexts
                                                        [string] [default: "id"]

  --filename, -n      Name of file if single context
                                                 [string] [default: "share.jpg"]

  --verbose, -v       Whether to log updates in the console
                                                       [boolean] [default: true]

  --cleanup, --cu     Whether to delete the .tmp directory
                                                       [boolean] [default: true]

Examples

FAQs

Package last updated on 19 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts