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

@musora/icons

v1.0.6

Published

A custom svg icon font/library

Downloads

346

Readme

Icons - @musora/icons

A custom svg icon font/library

Build Status

Usage

Loading From a CDN

<head>
    <link 
        rel="stylesheet" 
        href="https://d1prhhmg8i11jr.cloudfront.net/v1.0.0/dist/icons.css"
    >
</head>
<body>
    <i class="icon-courses"></i>
</body>

Loading from NPM

npm install @musora/icons or yarn install @musora/icons

Using a Javascript file:

import '@musora/icons/dist/icons.css';

Using a CSS file:

@import '~@musora/icons/dist/icons.css';

Keep in mind that your webpack config will need to have the relevant file loaders. Webpack should give you warnings/errors regarding the loaders you need.

Using the SVGs in React Native

  1. Install the package from NPM or Yarn npm install @musora/icons or yarn install @musora/icons
  2. Install the react-native-svg package
  3. Install the react-native-svg-transformer package
  4. In your metro.config.js file, add the following transformer:
const { getDefaultConfig } = require('metro-config');

module.exports = (async () => {
  const {
    resolver: { sourceExts, assetExts },
  } = await getDefaultConfig();
  return {
    transformer: {
      babelTransformerPath: require.resolve('react-native-svg-transformer'),
    },
    resolver: {
      assetExts: assetExts.filter(ext => ext !== 'svg'),
      sourceExts: [...sourceExts, 'svg'],
    },
  };
})();

You can now import the SVG file directly and use it as a component:

import CourseIcon from '@musora/icons/assets/svg/courses.svg';

<CourseIcon width={100} height={100} />

Adding New Icons

  1. Make sure your svg is a 100x100 square and place it in the assets/svg directory
  2. Install the dependencies - yarn install
  3. Generate the Font - yarn font:generate

Deployment to S3

  1. npm version patch - This command will do a few things:
    • Bump the version number up by 1: 1.0.0 -> 1.0.1
    • Create a commit and tag under that version number
  2. Push the commit and the tag

Note that Travis will only deploy to S3 when you push the tag.

  • The directory it deploys to will match the version number in the tag