nerves_bootstrap v1.4.1 mix nerves.new

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

mix nerves.new PATH [--module MODULE] [--app APP] [--target TARGET] [--cookie STRING]

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.

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.

A --target option can be given to limit support to one or more of the officially Nerves systems. For a list of supported targets visit https://hexdocs.pm/nerves/targets.html#supported-targets-and-systems

A --cookie options can be given to set the Erlang distribution cookie in vm.args. This defaults to a randomly generated string.

Generate a project preloaded with nerves_init_gadget support by passing --init-gadget.

Examples

mix nerves.new blinky

Is equivalent to:

mix nerves.new blinky --module Blinky

Generate a project configured to use nerves_init_gadget

mix nerves.new blinky --init-gadget

Generate a project that only supports Raspberry Pi 3

mix nerves.new blinky --target rpi3

Generate a project that supports Raspberry Pi 3 and Raspberry Pi Zero

mix nerves.new blinky --target rpi3 --target rpi0

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

Link to this function recompile(regex)

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

Callback implementation for Mix.Task.run/1.

Link to this function run(app, mod, path, opts)