Collocate Slime live templates with live views
This module is based on code copied from phoenix_live_view.
Phoenix live views and templates in EEx format can be collocated.
The EEx template must have the .leex
extension for this to work.
This library implements the same behaviour via a macro:
use PhoenixSlime.LiveView.CollocatedTemplate
Slime live templates, by default have the extension .slimleex
.
If you want to specify a different extension, e.g. .slive
,
for your collocated templates, invoke the macro as follows:
use PhoenixSlime.LiveView.CollocatedTemplate, extension: :slive
The package can be installed by adding
phoenix_slime_live_view_collocated_template
to your list of dependencies in mix.exs
:
def deps do
[
{:phoenix_slime_live_view_collocated_template, "~> 0.1.0"}
]
end
Documentation is here.
MIT license. Please see LICENSE for details.