1.0.2 • Published 5 years ago

svgicon2font v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

svgicon2font

svg icons package to web font

Usage

install

npm install svgicon2font
# or
yarn add svgicon2font

example

const svgIcon2Font = require('svgicon2font').svgIcon2Font

/**
 * @param {SVGIcon2FontConfig} initinalConfig
 *
 * @type {SVGIcon2FontConfig}
 * export interface SVGIcon2FontConfig {
 *   entry: string;  // you svg icon path
 *   output: string;  // css file write position
 *   iconCssFileName?: string;  // css file name
 *   fontName: string;  // font face name @default('iconfont')
 *   iconPrefix?: string;  // icon class prefix
 *   inline?: boolean;  // use base64 string in css file or write alone font file
 *   formats?: FontFormat[];  // font format you need, support eot ttf woff woff2
 *   startUnicode?: number;  // icon start unicode
 * }
 */
svgIcon2Font(initinalConfig: SVGIcon2FontConfig)

or

svgIcon2Font(initinalConfig: SVGIcon2FontConfig).then(() => {
  // execute after build
})

Feature

Contact

License

MIT

Copyright (c) 2019-present, Zhongqc