GithubHelp home page GithubHelp logo

rpeterson / rebar-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mbbx6spp/rebar-templates

0.0 1.0 0.0 109 KB

Rebar Erlang and OTP templates written by Susan Potter of Finsignia. Until Rebar supports global default variable setting, you will probably need to fork this repository and edit the author_name and author_email in the variables section of the .template files.

rebar-templates's Introduction

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+)

Notes

If you don’t already you can clone this Git repository in your ${HOME}/.rebar/templates directory, i.e.:


 $ git clone git://github.com/mbbx6spp/rebar-templates.git ~/.rebar/templates

(Thanks @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)

  • Ahmed D. Omar – bug fix in ejabberdmod template (s/init\/7/init\/2/ in exports).

Examples

Rebar Project Layout

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


 $ 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:


. ├── 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:


%% inside your rebar based project directory $ rebar create template=ejabberdmod name=mod_name_here

HTH
@SusanPotter

rebar-templates's People

Contributors

mbbx6spp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.