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

svg-component-library-creator

v1.0.3

Published

svg-component-library-creator CLI

Downloads

2

Readme

npm version Typescript Checked code style: prettier GitHub license

• Why?

One day I was working on a React Native application, and I had to transfer over about 25 some icons. I was dreading doing this, as I had to go in one by one and copying the necessary SVG code and pasting it... Then I noticed a pattern... I figured out i could completly automate (partially) the creation of a very clean, and easy to understand component.

• A MUST for React Native developers (especially beginners)

I remember a little bit over 6 months ago, I was tasked on increasing the load times of icons. Naturally, coming from a web developer background, i decided to look into using SVGs. Little did i know I would spend about a week or so trying to get those #&*&@! SVG files to load. At the end, I ended up creating this horrible system where i had to manually paste the code in individual js files... at the end we ended up having around 30 js files JUST for icons.

This CLI helps newbie developers be able to integrate SVG icons with the press of the button.

• How to use

  1. Locate the parent folder with all the svgs
  2. Run npx svg-component-library-creator create [FOLDER_NAME] or npx svg-clc c [FOLDER_NAME]
    • If no folder name is provided, the CLI will search for svgs as a default folder
  3. Follow through the promps until the success message is displayed
  4. Move or Copy/Paste your brand new Icons.tsx (Icons.js if using Vanilla JS) to your project!

Added new icons to your library?? Just run the command again and as long as all file names stayed the same there will be 0 naming issues!!

  • Commands

| Commands | Description | Parameters | | :----------- | :-------------------------------------------------------- | -----------------: | | create, c | Converts multiple svg files into a single react component | * [ FOLDER_NAME ] | | help, h | Displays all available commands | | | version, v | Displays current version | |

*- optional parameter

Got an issue or have an idea? Create an Issue