Erlang Language Rebar3 Bootstrapping a new Erlang project


Example

To bootstrap a new Erlang project, simply choose the template you want to use from the list. The available templates can be retrieved by the following command:

$ rebar3 new

app (built-in): Complete OTP Application structure
cmake (built-in): Standalone Makefile for building C/C++ in c_src
escript (built-in): Complete escriptized application structure
lib (built-in): Complete OTP Library application (no processes) structure
plugin (built-in): Rebar3 plugin project structure
release (built-in): OTP Release structure for executable programs

Once you have chosen the appropriate template, bootstrap it with the following command (rebar3 will create a new directory for your project):

$ rebar3 new lib libname

===> Writing libname/src/libname.erl
===> Writing libname/src/libname.app.src
===> Writing libname/rebar.config
===> Writing libname/.gitignore
===> Writing libname/LICENSE
===> Writing libname/README.md

OBS: Although you can run rebar3 new <template> . to create the new project in the current directory, this is not recommended, because the bootstrapped files will use . (dot) as application and module names and also in the rebar.config, which will cause you syntax problems.