Skip to content

isaxxx/iconfont-gen

Repository files navigation

iconfont-gen

Generate Iconfont from SVG files.

NPM Build Status MIT License

Installation

NPM

$ npm install iconfont-gen --save

Usage

CLI

Options:
  --src             src files path pattern. [string] [default: './src/svg/*.svg']
  --dest            dest directory path. [string] [default: './dest/assets/fonts/']
  --name            font name. [string] [default: 'iconfont']
  --templateInput   template file path. [string] [default: __dirname + '/template/index.ejs']
  --templateOutput  template file output path. [string] [default: './src/scss/_iconfont.scss']
  --version, -v     show this version. [boolean]
  --help, -h        show this help. [boolean]
$ iconfont-gen --src ./src/svg/*.svg --dest ./dest/assets/fonts/ --name iconfont --templateInput ./template/index.ejs --templateOutput ./src/scss/_iconfont.scss

JavaScript

iconfontGen({
  src: './src/svg/*.svg',
  dest: './dest/assets/fonts/',
  name: 'iconfont',
  templateInput: './template/index.ejs',
  templateOutput: './src/scss/_iconfont.scss'
}).then(() => {
  console.log('Complete!!');
});

About

Generate Iconfont from SVG files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published