@cc-heart/icon-class-generate

1.0.4 • Public • Published

icon class generate

Parse the css (for example iconfont) of the third-party library to generate the class class name

install

npm install @cc-heart/icon-class-generate

Usage

  • Create a .iconrc.js file in the root directory

Add the following configuration

module.exports = {
  iconList: ['https://at.alicdn.com/t/c/font_3590164_vc3wep8wbzf.css'],
  outDir: '/icon'
}
  • Create a js file(for example,js file name is genIcon.js) that runs to generate the icon class
const { bootstrap } = require('@cc-heart/icon-class-generate');
bootstrap()

Run the js file

node  genIcon.js

An icon.json file lives in the specified outdir file directory

{
    "acade-1": [
        "acade-1 icon-wangluokecheng"
    ]
}

Readme

Keywords

Package Sidebar

Install

npm i @cc-heart/icon-class-generate

Weekly Downloads

70

Version

1.0.4

License

MIT

Unpacked Size

215 kB

Total Files

37

Last publish

Collaborators

  • cc-heart