Giter Club home page Giter Club logo

mp-iconfont-cli's Introduction

在微信小程序开发中,使用 iconfont 需要引用本地的文件。每次 iconfont 项目发生变更时,需要去下载最新的 css 文件,并且还要手动删除掉里面对于小程序无用的 src url(*) 兼容节点,然后保存为 wxss 文件。整个过程比较繁琐,这个小工具可以帮你自动完成这些工作。

运行效果

使用指南

安装

npm i -D mp-iconfont-cli

请安装 Node.js 8+ 版本。

使用范例

目前仅支持 GitHub 账号登录 iconfont。安装完毕后,在你的项目根目录下运行:

npx iconfont-update

运行过程中会列出 iconfont 中我的项目列表,选择你需要的项目,按照后面的提示操作即可。

清除设定值

第一次运行完毕后,工具会记住你的选项,下次再运行时无需重复输入了。如果需要清除输入过的设定值,运行下面的命令:

npx iconfont-update --clear

显示详细错误内容

有时由于网络不太好或者其他情况会出现异常错误,如需要显示详细的异常信息,请在运行时加上选项 --trace

npx iconfont-update --trace

设计思路

mp-iconfont-cli's People

Contributors

deepfunc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.