npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nfq/svg-to-react

v3.0.3

Published

Package to batch create react components from svg images

Downloads

18

Readme

@nfq/svg-to-react

EsLint


  1. Description
  2. Getting started
    1. Installation
  3. Usage
  4. Props
  5. Support

Description: License: MIT

This project, @nfq/svg-to-react, is a powerful tool that allows you to convert SVG images into React components. It's built with Node.js and TypeScript. The main functionality of this package is to take a directory or a file of SVG images as input, and output a directory of React components. This is particularly useful for projects where SVG images are used extensively and need to be managed efficiently. The package provides a command line interface for easy use. It also supports different templates for generation, including 'typescript', 'jsdoc-typescript', and 'legacy'. This allows you to choose the format that best suits your project's needs.


Getting started

To the package follow the next steps:

Installation

To install the package run

npm install -g <Project name>

if you are on yarn

yarn add --global <Project name>

or on pnpm

pnpm install -g <Project name>

Usage

You can use this package to convert SVG files to React components. You can specify the input directory or file, the output directory, and the template to use for generation. The available templates are 'typescript', 'jsdoc-typescript', and 'legacy'.

For example, to convert all SVG files in the icons directory and output them as TypeScript React components in the components directory, you would use the following command:

svgToReact --src ./icons --out ./components --template typescript

Props

This package provides a command line interface with the following options:

  • src: The input directory or file.
  • out: The output directory.
  • template: The generation type. It has to be one of the following options: ['typescript', 'jsdoc-typescript', 'legacy'].

Support

Christoph Kruppe - [https://github.com/ckruppe] - [email protected]