forwardemail/font-awesome-assets

Consider adding a cli tool

Closed this issue · 4 comments

Hey guys, first of all, this project is really nice, it is fitting all my needs by now.

I was just wondering, it would be really nice if I could use this project via a cli tool. For example:

font-awesome-assets svg home 128 "#000" > home.svg

(or something like that)

So, every time I need to create (or even recreate, due to new version) an icon, I wouldn't need to code any javascript.

Also, I think I would be able to add your project in my package.json and just add an npm script to encapsulate that cli, and just use like this:

npm run gen:icon svg home 128 "#000" > home.svg

What do you think about that?

I love this idea. This could live in a separate CLI module and may actually work better with a shorter bin name like fa or faa.

Ideally, we should be setting those parameters via flags since it would be difficult for a user to remember the exact order of the options...

$ faa home

$ faa home --color "#000" > home.svg

$ faa home --size 128 > home.svg

$ faa home --type svg > home.svg

$ faa home --type png > home.png

Just submit a pull request and use crocodile CLI for inspiration at https://github.com/crocodilejs/crocodile-cli

Anyone interested in adding this as a PR? @wmartins @vutran

PR welcome