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

fis-command-iconfont

v1.0.1

Published

fis svg2font

Downloads

26

Readme

fis-iconfont


背景与简介

移动端iconfont的使用越来越广泛,由于缺少比较好的自动化工具,开发者在修改字体图标时需要在2个平台icomooneverythingfonts进行转换,免费服务各种限制,而且还要手工进行额外的操作。

本插件实现一键转换svg图标为svg,oet,ttf,woff,woff2的功能。

由于开源模块大量使用了异步调用,所以暂未改造成fis release 插件,先用command命令来实现自动化需求。

开始使用

安装插件

执行 npm install -g fis-iconfont 全局安装

配置说明

var settings = {
    src:'./src/resource/svgs',
    dest:'./src/resource/fonts',
    fontname:'wiifont'
}

src 为svg文件夹
dest 为生成字体以后的文件夹
fontname 为字体的名称

生成字体

在fis模块根目录执行fis iconfont即可完成字体转换工作,字体将生成更新到指定dest目录里(原有同名字体将删除)。 本插件里附带可以测试的 svg 文件在src中可以找到。

命令行方式调用

fis3 iconfont -n wiifont -s ./src/resource/svgs -d ./output

fis集成方式

fis.config.set("iconfont", {
    'src': '/src/resource/svgs', //图标目录
    'dest': '/src/resource/fonts', //产出字体目录
    'fontname': 'wiifont', //产出字体名称
    'order': 'name' //name或者time //图标按名称还是按修改时间排序,默认按名称排序
});

使用demo

fis3-iconfont-demo

如果出现 html或css 乱码问题

请查看你本机的"lodash": "^2.4.2"版本是否为该版本。