slim-template / haml2slim

Haml to Slim converter.
http://slim-lang.com/
120 stars 20 forks source link

Add stdin/stdout support #8

Closed wojtekmach closed 12 years ago

wojtekmach commented 12 years ago

Hi, I added stdin and stdout support for haml2slim, usage is as follows:

haml2slim /path/to/file.slim - # writes to stdout
cat /path/to/file.slim | haml2slim # reads from stdin and writes to stdout

What do you think about it?

PS I had trouble running tests for ruby-1.9.2/slim-1.0.3, I made sure my new tests do pass

fredwu commented 12 years ago

Hmmm, interesting. It's very useful, though I'm not entirely sure about the use of -. Any alternatives you could think of? :)

minad commented 12 years ago

"-" is used in other shell commands as well for stdout or stdin

fredwu commented 12 years ago

OK, that's cool. I'll merge this in once I fixed the tests to run on slim 1.0.3.

fredwu commented 12 years ago

Merged! Thanks @wojtekmach !