add, edit or remove a svg from assets/icons directory, the building will auto start and generate font files.
- auto generate .eot,.svg,.ttf,.woff files
- auto generate .css files include font base64 css file
- auto generate svg symbols into js file
- auto generate icons preview files and start a server for preview
$ npm i iconfont-generator-v2 -g
$ iconfont-generator --watch --sourceDir=assets/icons --distDir=assets/icon-fontsdefault options:
{
watch: false,
sourceDir: "assets/icons/",
distDir: "assets/icon-fonts/",
fontName: "iconfont",
className: "iconfont",
classPrefix: "icon-",
port: 8750,
debug: false
};make iconfont-generator.config.js file in project root directory, contents:
export default {
...someOptions // see above default options
};$ git colne [email protected]:semdy/iconfont-generator.git
$ cd iconfont-generator
$ npm install
$ npm start or npm run build