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 🙏

© 2026 – Pkg Stats / Ryan Hefner

uni-icon

v1.0.1

Published

uniapp项目中,使用阿里图标库一样引入svg图标

Readme

uni-icon

在UNIAPP项目中,引入阿里图标库,但是无法使用svg图标,uni-icon可以在本地进行转换,可以像阿里图标库引入图标那样,在小程序H5引入svg图标,无需添加任何组件

建议通过npm的方式安装使用

通过引入文件使用(不建议!!!

  1. 解压插件包后,找到dist目录下的文件,复制到项目根目录下的新目录下
  2. 本地UNIAPP项目的根目录下创建一个unicon.config.js配置文件,符合CommonJS格式
    module.exports = {
       output: 'src/static/icon/iconfont.css',
       singleColorSvg: [],
       url: '//at.alicdn.com/t/c/font_2719016_pki5wig395f.js'
    }
    字段解释: output:转换生成后的css文件,输出的路径,写法要符合Unix的规范;必填 singleColorSvg:单独进行转换的单色svg图标;选填 url:在阿里图标库的项目中,Symbol按钮生成的图标CDN地址;必填
  3. package.json的脚本命令中添加一个命令
  "scripts": {
    // ......
    "icon": "node xxx(在第一步创建的目录名)/bin/uni-icon.js"
  }
  1. 以上步骤完成后,运行npm run icon,会在output路径输入转换后的CSS文件
  2. 然后在UNIAPP的项目中引入对应的类名,(和使用iconfont中的类一样)

通过npm方式

Installation


npm install uni-icon -D

Usage


  1. 本地UNIAPP项目的根目录下创建一个unicon.config.js配置文件,符合CommonJS格式
    module.exports = {
       output: 'src/static/icon/iconfont.css',
       singleColorSvg: [],
       url: '//at.alicdn.com/t/c/font_2719016_pki5wig395f.js'
    }
    字段解释: output:转换生成后的css文件,输出的路径,写法要符合Unix的规范;必填 singleColorSvg:单独进行转换的单色svg图标;选填 url:在阿里图标库的项目中,Symbol按钮生成的图标CDN地址;必填
  2. package.json的脚本命令中添加一个命令
  "scripts": {
    // ......
    "icon": "uni-icon"
  }
  1. 以上步骤完成后,运行npm run icon,会在output路径输入转换后的CSS文件
  2. 然后在UNIAPP的项目中引入对应的类名,(和使用iconfont中的类一样)