svg-to-iconfont

1.1.6 • Public • Published

svg-to-iconfont

Read a set of SVG icons and ouput a TTF/EOT/WOFF/SVG font, Generator of fonts from SVG icons. 将svg文件转换为字体图标

Install

npm i svg-to-iconfont

Usage

const svgtoiconfont = require("../src");
const path = require("path");
const rootPath = path.resolve(process.cwd(), "test");
const svgtoiconfont = require("svg-to-iconfont");
 
svgtoiconfont({
  dist: path.resolve(rootPath, "dist"), // output path(输出文件路径)
  src: path.resolve(rootPath, "svg"), // svg path(svg资源路径)
  fontName: "icomoon", // font name (字体名称)
  classNamePrefix: "e6-icon", // class name prefix (class前缀)
}).then(() => {
  console.log('done!');
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.60latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i svg-to-iconfont

Weekly Downloads

0

Version

1.1.6

License

MIT

Unpacked Size

12.5 kB

Total Files

6

Last publish

Collaborators

  • sxd1991