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

rn-create-icon

v0.1.5

Published

Icon Set Creator for React Native

Downloads

2

Readme

  • 🌈 Easy to install — does not require additional programs
  • ⚡️ Fast — image manipulation powered by sharp
  • 🛠 Configurable — using cli options or config file
  • 🌟 Adaptive Icons — support for color and image backgrounds
  • 📱 iOS and Android support — create icons for both platforms with one command

Node Version Requirement

Icon set creator requires Node.js version 14.0 or above (v16+ recommended). You can manage multiple versions of Node on the same machine with n, nvm or nvm-windows .

To install the new package globally, use one of the following commands. You need administrator privileges to execute these unless npm was installed on your system through a Node.js version manager (e.g. n or nvm).

$ npm install -g icon-set-creator
# OR
$ yarn global add icon-set-creator

After installation, you will have access to the iconset binary in your command line. You can verify that it is properly installed by simply running iconset, which should present you with a help message listing all available commands.

You can check you have the right version with this command:

$ iconset --version

If you want to install the icon-set-creator locally, use one of the following commands:

$ npm install icon-set-creator -D
# OR
$ yarn add icon-set-creator -D

The easiest way to use icon-set-creator is to specify the path to icon using iconset create command in root of your project:

$ iconset create ./icon.png

If you have the package installed locally, you can do same with the package.json script and then run it with npm run create-appicon:

{
  "scripts": {
    "create-appicon": "iconset create ./icon.png"
  }
}

It will generate icons of different sizes for Android and iOS.

There are two ways you can configure icon-set-creator. The first with the cli parameters, and the second is through the config file iconset.config.js or package.json depending on your code style.

  • imagePath — The location of the icon image file which you want to use as the app launcher icon. e.g. ./assets/icon.png
  • android/ios (optional): true — Override the default existing Flutter launcher icon for the platform specified, false — ignore making launcher icons for this platform, icon_name — this will generate a new launcher icons for the platform with the name you specify, without removing the old default existing Flutter launcher icon.
  • imagePathAndroid — The location of the icon image file specific for Android platform (optional — if not defined then the imagePath is used)
  • imagePathIos — The location of the icon image file specific for iOS platform (optional — if not defined then the imagePath is used)

The next two attributes are only used when generating Android launcher icon:

  • adaptiveIconBackground — The color (E.g. "#ffffff") or image asset (E.g. "assets/images/dark-background.png") which will be used to fill out the background of the adaptive icon
  • adaptiveIconForeground — The image asset which will be used for the icon foreground of the adaptive icon
Usage: iconset create [options] [image-path]

Generate a new icon set for React Native project

Options:
  -A, --android [icon-name]                    Generate icon set for android
  -IPA, --image-path-android                   Image path for android
  --flavor [flavor]                            Flavor name
  -b, --adaptive-icon-background <background>  The color (E.g. "#ffffff") or image asset (E.g. "assets/images/christmas-background.png") which will be used to fill
                                               out the background of the adaptive icon.
  -f, --adaptive-icon-foreground <foreground>  The image asset which will be used for the icon foreground of the adaptive icon
  -I, --ios                                    Generate icon set for ios
  -IPI, --image-path-ios                       Image path for ios
  -h, --help                                   display help for command

You can check the example folder for example icons and this guide on Medium.