Phoenix Integration
Usage
- Add
{:phoenix_slime, "~> 0.12.0"}
to your deps inmix.exs
. - Add the following to your project's
config/config.exs
:
Live Reload
In my_app/config/dev.exs
, include the slim
and slime
extensions in the list of watched files:
Generators
This library also includes two mix
tasks:
mix phx.gen.html.slime
mix phx.gen.layout.slime
The first task creates a html resource in the same way phoenix.gen.html
does
with the exception that all files are .slim
files instead of .eex
files.
The second task creates a new web/templates/layout/app.html.slim
with the
exact same content as the app.html.eex
file. Do not forget to remove the old
app.html.eex
file.