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

@growsuper/icons

v1.5.4

Published

A Vue-based SVG Icon system. All icons come from our Design System.

Downloads

7

Readme

@growsuper/icons

A Vue-based SVG Icon system. All icons come from our Design System.

Development

You should install the Vue CLI if you haven't already.

npm install -g @vue/cli

You may also need to run the following

npm i -g @vue/cli-service-global

Now you can run npm start which will serve Library.vue, a page that imports all of the icons and displays them. This page can be built by running npm run build:docs, and in the future it will be automatically deployed on every update.

Adding a new icon

  1. Get the new icon from the design team, check that any fill attributes in the recieved SVG file are filled with the colour default value of #28324f.
  2. Execute the following command to create a new icon template (initially named as iconTEMPLATE.vue) into ./src/components/icons.
npm run new
  1. Update the iconName in the iconMixin.
  2. Rename the IconTEMPLATE.vue to the name of the icon it needs to be. Please follow existing naming convention.
  3. Replace everything between <gs-base-icon> tags with <path /> element found in the SVG icon you've been given by the design team. Remember to clean out all fill attributes from the <path /> so that color can be correctly applied via the <BaseIcon /> component and CSS.
  4. Import/export the component from ../index.js. The name you supply here will be prepended with gs- and will be the component that you use where you install this icon library. If there's more than one word, use kebab case. Eg 'add-circle' will become a <gs-add-circle />.
  5. Add the Icon you've exported in ../docs/Library.vue.
  6. Update the version in package.json.

Testing your new icon

Now that you've added your icon, you must test the icon before releasing it on NPM by installing this version in your application.

However, before the icon set can be installed, you must run npm run build. This will use Rollup.js to minify and package the icon library in various formats. The package.json's main, module and unpkg properties have already been configured so that where ever the icon set is imported, one of these packaged formats can be used.

Now in the application that depends on this icon set, you can run the following command to install from local

npm install {relative path to this icons repository}

Releasing

IMPORTANT: ENSURE THAT YOU HAVE RUN npm build TO GENERATE THE /dist FOLDERS and updated the version number in package.json.

  1. Make sure you've completed the above step before continuing.
  2. Ensure that you've set your token in .npmrc. If you don't have this token or don't know what this is, ask a fellow dev.
  3. You can now run npm publish to release a new version.

If you need to check that the package has been published correctly, check with a more senior dev as the NPM login is not given out willy nilly.

Technical approach

For more details about the technical approach taken to the package and it's components, see the following entries from the official Vue.js cookbook. They served as inspiration and a great starting point to adapt.

This repo was scaffolded using vue-sfc-rollup