Slim Command Line Interface
Install:
$ gem install slim
The command:
$ slimrb
The options:
$ slimrb --help
Usage: slimrb [options]
-s, --stdin Read input from standard input instead of an input file
--trace Show a full traceback on error
-c, --compile Compile only but do not run
-r, --rails Generate rails compatible code (combine with -c)
-S, --sections Logic-less sections mode
-p, --pretty Produce pretty html
-h, --help Show this message
-v, --version Print version
Trying it out (this example requires the rdiscount gem):
Type your template, when you're done CTRL-D to send EOF.
$ slimrb
markdown:
First paragraph.
Second paragraph.
* one
* two
* three
//Enter CTRL-D
<p>First paragraph </p>
<p>Second paragraph </p>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
Want to see the compiled code for a Rails view?:
$ slimrb --rails --compile app/views/show.slim
Source: stonean/slim | Slim logo & site design by activestylus
Copyrights | 2024 | slim-lang.com