Gozala/wisp — pull request #97 by xkxx (2014-04-24 07:51:33+00:00)
Title: use commander.js for args handling; add --ast and --js-ast for debugging...

Hi there,

This is the patch I emailed you about several days ago. It adds the following things:

* `--ast` and `--js-ast` flags, for easier debugging (CoffeeScript has similar features)
* `--help` or `-h` which prints usage information (wisp doesn't have this before)
* command shortcuts, like -i, -h, etc.

The current interface is mostly compatible with the non-commander version. However, I wasn't able to verify every flag that existed because there is no documentation for them (one of the reason I created this patch)

Other thoughts:

* The `--no-map` option in official version seems to do nothing. This bug is carried over.
* By default, the wisp binary dumps the compiled javascript in the terminal. I think a better idea would be to output it into a file of the same basename. I added an `--output` flag for this purpose, but it doesn't do anything yet.

File changes:
* package.json: add commander as dependency
* wisp.wisp: rewrite `main` to use commander; add support for --ast and --js-ast