Templating template files, `mytemplate.eex.eex`

Is it possible to escape the content of .eex files so when then compile the returned value is valid .eex.

I am writing a generator and want to create .eex files using the generator. When being build by the generator I want to embed some values such as the app name etc. There are a second level of interpolated variables that should be handled when the generated project is run

1 Like

phoenix does exactly that in it’s generator mix tasks: https://github.com/phoenixframework/phoenix/tree/master/priv/templates/phx.gen.html

1 Like