cognitom / symbols-for-sketch

Symbol font templates for Sketch.app
679 stars 76 forks source link

Adds ability to pass CLI args for configuration #3

Open tylergaw opened 10 years ago

tylergaw commented 10 years ago

In the current iteration, to make config changes you need to manually edit the gulp.js file. This pr makes use of https://github.com/chevex/yargs to allow the available config options to be passed via command line arguments.

For example. To use a different sketch file, custom name, class and distribution location you can:

gulp symbols -d ~/Documents/myfonticon.sketch -n my-fonticon -c icons -l ~/Documents/project/fonts/

This also adds a no gulp task clean-dist that removes all the files and directories from either the default dist location or one given by -l.

Updated the readme with all of the options and descriptions. Added the same behind gulp -h

tylergaw commented 10 years ago

@cognitom Also, I really love this project. I've used it a handful of times and it's excellent. Thank you!

cognitom commented 10 years ago

@tylergaw Thank you for your pr :-) I think we need some discussion about it. This repository has started as a template, not as a plugin. And I preferred to keep it simple. I have two questions. Any comments are welcome.

tylergaw commented 10 years ago

@cognitom Cool, thanks.

I could see it going either way. The CLI args may add too much complexity to an otherwise simple template. Or it could make it easier for a small group of folks to use.