duojs/duo — pull request #406 by dominicbarnes (2014-12-05 20:20:38+00:00)
Title: Removing some magic from the CLI

This PR aims to simplify the CLI as described in #400:

* no longer automatically piping to stdout for a single entry
* when using `stdin`, using `stdout` is implied and still works as before
* the `--stdout` flag has been added to specify `stdout`
* removing the implicit 'output' dir as the last argument
* the already available `--output` flag should now always be used
* expanding folders via `glob` into a list of files (arguably magic, but predictable)

Overall, I think this will be a huge win for simplicity and predictability on the part of the CLI, while still retaining stdout capabilities.

Not only that, but it adds handling for directories of assets. I think this should be the preferred approach for addressing things like #171 without needing to get involved with parsing HTML/Jade/ which would be a huge pain in sooooooo many ways. (not to mention brittle) This will also be the first step towards becoming a true asset pipeline, where plugins can freely transform assets in addition to source code. :)

Really wanting some feedback on this one, as this is not _entirely_ backwards-compatible.

/cc @MatthewMueller @stephenmathieson