jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

Use optimist to parse CLI options #193

Open mcandre opened 11 years ago

mcandre commented 11 years ago

optimist does the work of parsing command line options for you. If we use optimist, that could simplify the logic in lib/parseargs.js.

mde commented 11 years ago

I'm certainly not opposed to using a third-party library for opts. However, Jake's CLI API is extremely flexible and somewhat idiosyncratic, including flags, commands, and environment variables. So it's definitely not a simple case of parsing command-line opts like you might see with other programs. We do have tests for parseargs, so a good first step might be seeing if you can get those working in a branch with Optimist.