Creates a new module in the current application, based on a template.
The location of the new module is defined according to the :mount option in
:modkit configuration defined in the project file (mix.exs).
If not defined, default mount points are defined as follows:
[
{App, "lib/app"}
{Mix.Tasks, "lib/mix/tasks", flavor: :mix_task}
]Synopsis
mix mod.new [options] moduleArguments
module
Options
-t,--template <string>- Use the given template for the module code.Accepts a path to an .eex file or a built-in template:
-u,--test- Create a unit test module for the generated module. Defaults tofalse.-U,--test-only- Create the unit test only, without generating the module. Defaults tofalse.-p,--path <string>- The path of the module file to write (must end with .ex). Only applies to the module file; when --test/--test-only is given, the test file path is derived from it. Unnecessary if the module prefix is mounted.-o,--overwrite- Overwrite existing files. Defaults tofalse.--help- Displays this help.