-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from doomspork/wire-up-slim-fast
Support slim templates
- Loading branch information
Showing
11 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Phoenix Template Engine for Haml | ||
|
||
> Powered by [Calliope](https://github.com/nurugger07/calliope) | ||
> Powered by [SlimFast](https://github.com/doomspork/slim_fast) | ||
## Usage | ||
|
||
1. Add `{:phoenix_haml, "~> 0.1.1"}` to your deps in `mix.exs`. | ||
If you generated your app from the Phoenix master branch, | ||
add phoenix_haml's master branch to your deps instead. | ||
`{:phoenix_haml, github: "chrismccord/phoenix_haml"}` | ||
2. Add the following your Phoenix `config/config.exs` | ||
1. Add `{:phoenix_slim, "~> 0.1.0"}` to your deps in `mix.exs`. | ||
2. Add the following your Phoenix `config/config.exs`: | ||
|
||
```elixir | ||
config :phoenix, :template_engines, | ||
haml: PhoenixHaml.Engine | ||
slim: PhoenixSlim.Engine | ||
``` | ||
|
||
## License | ||
|
||
Please see [LICENSE](https://github.com/doomspork/slim_fast/blob/master/LICENSE) for licensing details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
use Mix.Config | ||
|
||
config :phoenix, :template_engines, | ||
haml: PhoenixHaml.Engine | ||
|
||
slim: PhoenixSlim.Engine |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
defmodule PhoenixSlim do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
defmodule PhoenixHaml.Mixfile do | ||
defmodule PhoenixSlim.Mixfile do | ||
use Mix.Project | ||
|
||
def project do | ||
[ | ||
app: :phoenix_haml, | ||
version: "0.1.2", | ||
elixir: "~> 1.0.1 or ~> 1.1", | ||
app: :phoenix_slim, | ||
version: "0.1.0", | ||
elixir: "~> 1.0", | ||
deps: deps, | ||
package: [ | ||
contributors: ["Chris McCord"], | ||
contributors: ["Sean Callan"], | ||
licenses: ["MIT"], | ||
links: %{github: "https://github.com/chrismccord/phoenix_haml"} | ||
links: %{github: "https://github.com/doomspork/phoenix_slim"} | ||
], | ||
description: """ | ||
Phoenix Template Engine for Haml | ||
Phoenix Template Engine for Slim | ||
""" | ||
] | ||
end | ||
|
||
def application do | ||
[applications: [:phoenix, :calliope]] | ||
[applications: [:phoenix, :slim_fast]] | ||
end | ||
|
||
defp deps do | ||
[ | ||
{:phoenix, "~> 0.13"}, | ||
{:phoenix_html, "~> 1.1"}, | ||
{:cowboy, "~> 1.0.0", only: [:dev, :test]}, | ||
{:calliope, "~> 0.3.0"} | ||
{:phoenix, "~> 0.15.0"}, | ||
{:phoenix_html, "~> 2.0"}, | ||
{:cowboy, "~> 1.0", only: [:dev, :test]}, | ||
{:slim_fast, "~> 0.2.0"} | ||
] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
%{"calliope": {:hex, :calliope, "0.3.0"}, | ||
"cowboy": {:hex, :cowboy, "1.0.0"}, | ||
%{"cowboy": {:hex, :cowboy, "1.0.2"}, | ||
"cowlib": {:hex, :cowlib, "1.0.1"}, | ||
"phoenix": {:hex, :phoenix, "0.13.1"}, | ||
"phoenix_html": {:hex, :phoenix_html, "1.2.1"}, | ||
"plug": {:hex, :plug, "0.13.0"}, | ||
"phoenix": {:hex, :phoenix, "0.15.0"}, | ||
"phoenix_html": {:hex, :phoenix_html, "2.0.1"}, | ||
"plug": {:hex, :plug, "0.14.0"}, | ||
"poison": {:hex, :poison, "1.4.0"}, | ||
"ranch": {:hex, :ranch, "1.0.0"}} | ||
"ranch": {:hex, :ranch, "1.1.0"}, | ||
"slim_fast": {:hex, :slim_fast, "0.2.0"}} |
4 changes: 2 additions & 2 deletions
4
...mplates/my_app/page/application.html.haml → ...mplates/my_app/page/application.html.slim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
%html | ||
%body | ||
html | ||
body | ||
= @inner | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h2 New Template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters