@geektech/svg2icon
v1.0.7
Published
Svg to icon
Downloads
4
Readme
svg2icon
Svg to icon
Usage
npm i @geektech/svg2icon
Makge dir '.svg2iconrc.js' in your project root like below;
{
"dist": "dist",
"src": "svg",
"fontName": "geek-icon",
"classNamePrefix": "geekicon",
"linkMode": "inline",
"ext": "wxss"
}
Makge dir 'svg' in your project and put in svg files;
Run
svg2icon
Or you can use your own script like below js:
const svgtoiconfont = require("@geektech/svg2icon");
svgtoiconfont({
dist: "dist", // output path(输出文件路径)
src: "svg", // svg path(svg资源路径)
fontName: "geek-icon", // font name (字体名称)
classNamePrefix: "geekicon", // class name prefix (class前缀)
linkMode: 'link', // inline\link [default link]
ext: 'less' // 后缀名
});