Created
April 17, 2019 14:28
-
-
Save topherhunt/cd2d6e6b676c816e4d5026e8ca42e762 to your computer and use it in GitHub Desktop.
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
# Rid your codebase of haml templates. | |
# Requires Calliope as a dependency in your Mix project. | |
# Usage: `mix run haml.exs path/to/my/haml/file.html.haml | |
# It will spit out the produced eex, which you can copy & paste into place. | |
path = System.argv() |> Enum.at(0) | |
{:ok, haml} = File.read(path) | |
IO.puts "" | |
IO.puts Calliope.render(haml) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment