Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ability to pass CLI args for configuration #3

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tylergaw
Copy link

@tylergaw tylergaw commented Aug 9, 2014

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
Copy link
Author

tylergaw commented Aug 9, 2014

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

@cognitom
Copy link
Owner

@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.

  • Are command line arguments familiar for "designers"?
  • Should be a template or a plugin?

@tylergaw
Copy link
Author

@cognitom Cool, thanks.

  • I think you're right, I don't think CLI args are the most familiar thing for a lot of designers. With this there may be more exceptions though because of the non-trivial install process. If a designer has enough knowledge to get everything installed and can call gulp maybe they're comfortable with the args?
  • Not completely sure. I added the CLI args to my fork for two reasons: 1) I found myself using the gulp file for multiple projects and I didn't want to have to keep manually editing the file. 2) I've started tinkering with a GUI for this where you can set all the options using standard OS X controls. For that to work I needed to be able to pass the options as args.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants