Workshape / icon-font-generator

Easy-to-use, pre-configured cli tool to generate webfont icon kits from a bunch of .svg files
MIT License
471 stars 76 forks source link

[Feature ask]Could we use icon-font-generator as API/library instead of CLI tool #57

Open fvdcx opened 5 years ago

fvdcx commented 5 years ago

@tancredi Could we use icon-font-generator as API/library instead of CLI tool

tancredi commented 5 years ago

Why not - would be curious to know more. Also undergoing a rewrite to remove dependency from the core library (which is not actively maintained anymore) and add new features. Mind popping me an email?

KennethJoris commented 5 years ago

Currently can require it like this:

const fontGenerator = require(require.resolve('icon-font-generator/lib/index.js')).generate;
fontGenerator(theOptions);

A little bit more documentation about theOptions would be nice. Now you have to go looking inside the JS files to figure out the correct key:values etc.

Nice Package though. Thanks !!