faylang/fay — pull request #60 by boothead (2012-08-11 10:15:20+00:00)
Title: Fay compiler using options module adding --pretty flag and support for stdin and stdout

The main two features added are are pretty formatting of the javascript and support for stdin and stdout:

* -p, --pretty flag which pipes the produced javascript though js-beautifier.
* fayc - takes it's .hs input from stdin (and outputs prettified js to stdout)
* -s, --stdin which prints to stdout

I haven't added the html wrapper stuff, and rebasing on top of master has broken my tests, which I'll try and fix ASAP, I just wanted to get this out to get some feedback.

Example usage:

`echo "main = print \"one\"" | ./cabal-dev/bin/fayc -`

Gives
```javascript
var main = new $(function() {
return _(print)(Fay$$list("one"));
});
```

These are the current help options

```
fay git:(fayc)$ ./cabal-dev/bin/fayc --help
fayc - the fay compiler
fayc [options] [- | files]
fayc - takes input on stdin (implies pretty)
fayc [files] processes each .hs file

Help Options:
-h, --help Show option summary.
--help-all Show all help options.

Application Options:
--tco
--autorun
--inline-force
--flatten-apps
--export-builtins
-s, --stdout Output to stdout
-p, --pretty Run javascript through js-beautify
```