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

To generate an umbrella application with sub applications:

mix new hello_world --umbrella
cd hello_world/apps
mix new child_app