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

@aligov/icon

v1.0.12

Published

默认引入政务自定义 Icon 的组件

Downloads

51

Readme

政务扩展图标

@aligov/icon

支持同时使用 Fusion 内置图标以及数字政务图标系统 的图标组件,除了 custom 属性外,其他属性和 Fusion Icon 的用法一致。

API

| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | ------ | ------------------ | ---- | ------- | ------ | ------------------------ | | custom | 是否使用自定义图标 | | boolean | false | 默认使用 fusion 内置图标 | | type | 图标编码代号 | | string | | |

其他事项

新增图标后,需要更新图标项目Symbol 链接,并更新该组件 package.json 里的 iconScriptUrl

在无法更新组件的情况下,可以通过在组件加载前设置全局变量来定制。

执行npm startnpm publish 时,会前置执行npm run updateIcon,来下载iconScriptUrl指向的资源至本地,打包时会用本地资源进行构建。

npm run updateIcon 依赖 curl命令。

执行命令后请检查iconfont.js是否有内容,如果没有则有可能是curl命令缺失,请手动复制iconScriptUrl指向的资源内容至iconfont.js,或安装curl并重新执行npm run updateIcon

全局变量

  • CUSTOM_ICONFONT_JS:iconfont Symbol js 地址,如 //at.alicdn.com/t/font_1432938_9mhelv05j69.js
  • CUSTOM_ICON_FIEFIX:自定义图标 symbol 前缀,如 gov-icon-。这样对于图标 gov-icon-yiju,在使用时 type 设为 yiju

数字政务图标系统及 iconfont 项目由设计师维护,图标系统(collection)是可公开访问的,图标可能比项目中的少一些(放到主题中了)。该组件中使用的是项目(project)中的所有图标。