noprompt/frak — pull request #7 by guns (2013-08-21 00:17:13+00:00)
Title: Use optparse-clj for nice CLI options processing

Hello,

I wouldn't normally push my own project like this, but since you said you were interested in using optparse-clj… this is how I might implement it!

BTW, I resolved the issue with not seeing ARGV by adding the same externs file for process.js that you have in frak (thanks for figuring that one out). It's not in the jar, but I was just using it for testing.

I added a new option vector option to optparse-clj just for frak: the `:key` option allows customization of the resulting option key in order to translate `--exact` to `:exact? true`. It was a nice addition.

Anyway, thanks for the suggestion to port to CLJS. I've been wanting to delve into this aspect of CLJS for a while now.

Patch header:

Allows GNU style options clumping:

$ bin/frak -ec foo bar baz
^(ba[rz]|foo)$

And nice failure messages:

$ bin/frak foo bar baz --evil
Failed to parse `--evil`: Invalid option