Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Command-line tool has no option to output compiled haml-coffee to stdout #44

Closed
dwwoelfel opened this Issue Nov 14, 2012 · 1 comment

Comments

Projects
None yet
2 participants

The command-line tool does not have an option to output the compiled haml-coffee to stdout. This makes it hard to do fun stuff like make an Emacs mode for haml-coffee that integrates with swank-js.

@netzpirat netzpirat closed this in 7b06e5a Nov 15, 2012

Owner

netzpirat commented Nov 15, 2012

That was fun! Really cool to quickly test a template on the command line. Thanks for the idea. I released 1.8.0 that contains stream redirection.

(From the README)

Stream redirection

You can use Haml Coffee on the command line to enter a template and stop it with Ctrl-D:

$ haml-coffee -p amd
%h1 Hello AMD
^D

which will output the AMD module source code to the console. You either have to set the placement option to amd or
give it a template name like

$ haml-coffee -t name
%p JST rocks!
^D

which will output the JST source code. Now you can also redirect files like:

$ haml-coffee -t name < input.hamlc > output.jst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment