View Source Cascade (Cascade v0.1.0)

Generate code from templates.

Summary

Functions

Generate the code associated to the given template name.

Returns all available templates.

Functions

Link to this function

generate(name, root_path, opts \\ [])

View Source
@spec generate(name :: atom(), root_path :: String.t(), opts :: keyword()) ::
  {: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. opts can be an arbitrary keyword list corresponding to the command line options passed to the mix cascade task.

@spec templates() :: keyword()

Returns all available templates.

All modules implementing the Cascade.Template behaviour will be returned.