Mix.Generator.copy_template

You're seeing just the function copy_template, go back to Mix.Generator module for more information.
Link to this function

copy_template(source, target, assigns, options \\ [])

View Source (since 1.9.0)

Specs

copy_template(Path.t(), Path.t(), keyword(), keyword()) :: boolean()

Evaluates and copy templates at source to target.

The template in source is evaluated with the given assigns.

If target already exists and the contents are not the same, it asks for user confirmation.

Options

  • :force - forces copying without a shell prompt
  • :quiet - does not log command output

Examples

iex> assigns = [project_path: "/Users/joe/newproject"]
iex> Mix.Generator.copy_template("source/gitignore", ".gitignore", assigns)
* creating .gitignore
true