Mix v1.6.4 mix new View Source

Creates a new Elixir project. It expects the path of the project as argument.

mix new PATH [--sup] [--module MODULE] [--app APP] [--umbrella]

A project at the given PATH will be created. The application name and module name will be retrieved from the path, unless --module or --app is given.

A --sup option can be given to generate an OTP application skeleton including a supervision tree. Normally an app is generated without a supervisor and without the app callback.

An --umbrella option can be given to generate an umbrella project.

An --app option can be given in order to name the OTP application for the project.

A --module option can be given in order to name the modules in the generated code skeleton.

Examples

mix new hello_world

Is equivalent to:

mix new hello_world --module HelloWorld

To generate an app with a supervision tree and an application callback:

mix new hello_world --sup

Link to this section Summary

Functions

A task needs to implement run which receives a list of command line args

Link to this section Functions

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.