Mix v1.1.1 Mix.Tasks.New

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 supervisor and application callback:

mix new hello_world --sup

Summary

Functions

Callback implementation for Mix.Task.run/1

Functions

run(argv)

Specs

run(OptionParser.argv) :: :ok

Callback implementation for Mix.Task.run/1.