All Projects → mbbx6spp → Rebar Templates

mbbx6spp / Rebar Templates

Rebar Erlang, OTP and other project templates. Use rebar3 for rebar3 templates and updates.

Programming Languages

erlang
1774 projects

== Rebar Templates

=== Overview

This might really only be useful for me, but I thought I would share the Rebar templates that I have written to streamline my Erlang development.

So far it only consists of templates for the following:

  • ejabberd module
  • OTP gen_server callback modules
  • OTP gen_event callback modules
  • simple rebar project layout
  • escript starter script
  • OTP application and supervisor callback modules
  • Nitrogen page handler (for Nitrogen v2+)

=== Status

Many of these templates are from a past life in Erlang which are no longer maintained. I am in the process of culling/curating these templates while I upgrade to rebar3 and return to more active Erlang development.

Please be patient during this transition period.

=== rebar3

If you don't already you can clone this Git repository in your ${HOME}/.config/rebar3/templates directory, like so:

[source,shell]

$ git clone git://github.com/mbbx6spp/rebar-templates.git
"${HOME}/.config/rebar3/templates"

Be sure to update the globals file with your preferred global values.

=== pre-rebar3

If you don't already you can clone this Git repository in your ${HOME}/.rebar/templates directory, like so:

[source,shell]

$ git clone git://github.com/mbbx6spp/rebar-templates.git
"${HOME}/.rebar/templates"

(Thanks link:http://twitter.com/dizzyd[@dizzyd] for the pointer.)

Alternatively you can add this as a submodule under ${PROJECT_ROOT}/priv/templates if you want to use these templates just for a particular project.

=== Developer(s)

=== Contributor(s)

=== Examples

=== Rebar Project Layout

If you want to create a new rebar directory layout for your new project you can do the following:

[source,shell]

$ mkdir project_name $ cd project_name $ rebar create template=project
project_name=project_name
description="Describe your project here."

This will generate 6 directories and 4 files by default that are organized like the following:

[source,shell]

. ├── deps/ ├── ebin/ ├── Emakefile ├── include/ ├── Makefile ├── priv/ ├── README ├── rebar.config ├── src/ └── tests/

=== ejabberd Module

To generate a stub of an ejabberd extension module that intercepts sent and received packets you can do the following:

[source,shell]

inside your rebar based project directory

$ rebar create template=ejabberdmod name=mod_name_here

HTH link:http://twitter.com/SusanPotter[@SusanPotter]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].