Skip to content

leanpanda-com/phoenix_slime_live_view_collocated_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhoenixSlime.LiveView.CollocatedTemplate

Collocate Slime live templates with live views

Authorship

This module is based on code copied from phoenix_live_view.

Motivation

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

Installation

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

Documentation is here.

License

MIT license. Please see LICENSE for details.

About

Collocate Slime live templates with live views

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages