View Source Cascade (Cascade v0.2.0)
Generate code from templates.
Summary
Functions
@spec generate( name :: atom(), root_path :: String.t(), args_or_opts :: keyword() | [String.t()] ) :: {:error, String.t()} | :ok
Generate the code associated to the given template name
.
root_path
is expected to be the root directory under which the template will be generated.args_or_opts
can be an arbitrary keyword list with the template options or a list of command line arguments passed to themix cascade
task. In the latter case the arguments will be validated using the template'sCascade.Template.args_schema/0
.
@spec templates() :: keyword()
Returns all available templates.
All modules implementing the Cascade.Template
behaviour will be returned.