0.0.5 • Published 2 years ago

iconfont-hero-cli v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

introduce

iconfont-hero-cli是一个通过配置,就可以生成结构化图标schema的小工具

install the cli

npm install -g iconfont-hero-cli
// tree -L 2 -I node_modules

├── README.md
├── example
│   └── vscode-iconfont.json
├── index.js
├── package-lock.json
├── package.json
└── yarn.lock
// vscode-iconfont.json
{
  "element": {
    "ttf": "https://unpkg.com/element-ui@2.15.9/lib/theme-chalk/fonts/element-icons.ttf",
    "css": "https://unpkg.com/element-ui@2.15.9/lib/theme-chalk/index.css"
  },
  "vant": {
    "ttf": "https://at.alicdn.com/t/font_2553510_iv4v8nulyz.ttf",
    "css": "https://unpkg.com/vant@3.5.4/lib/index.css"
  }
}

iconfont-hero-cli command

iconfont-hero -c ../example/vscode-iconfont.json

// iconfont-hero -c ../example/vscode-iconfont.json -f #ffffff (svg -> fill)

// iconfont-hero -c ../example/vscode-iconfont.json -w 20 (svg -> width)

// .iconfont/schema.json
{
  "el-icon-ice-cream-round": {
      "content": "\"\\e6a0\"",
      "svg": "data:image/svg+xml;utf8,....",
      "type": "element"
  },
  "el-icon-ice-cream-square": {
      "content": "\"\\e6a3\"",
      "svg": "data:image/svg+xml;utf8,....",
      "type": "element"
  },
  ...
}
0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago