Skip to content

Commit

Permalink
Added project template files for rebar.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbbx6spp committed Dec 10, 2010
1 parent 49227dd commit f16e930
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
17 changes: 17 additions & 0 deletions project.template
@@ -0,0 +1,17 @@
{variables, [
{project_name, "myproject"},
{copyright_year, 2010},
{author_name, "Susan Potter"},
{author_email, "me@susanpotter.net"}
]}.
{file, "project_rebar.config", "rebar.config"}.
{file, "project_Emakefile", "Emakefile"}.
{file, "project_Makefile", "Makefile"}.
{file, "project_gitignore", ".gitignore}.
{dir, "deps"}.
{dir, "src"}.
{dir, "ebin"}.
{dir, "include"}.
{dir, "tests"}.
{dir, "priv"}.
{template, "project_README", "README"}.
14 changes: 14 additions & 0 deletions project_Emakefile
@@ -0,0 +1,14 @@
% -*- mode: erlang -*-
{[ "*",
"src/*",
"src/*/*",
"src/*/*/*",
"src/*/*/*/*",
"src/*/*/*/*/*"
],
[
{i, "include"},
{outdir, "ebin"},
debug_info
]
}.
32 changes: 32 additions & 0 deletions project_Makefile
@@ -0,0 +1,32 @@
ERL ?= erl
ERLC = erlc
EBIN_DIRS := $(wildcard deps/*/ebin)
APPS := $(shell dir apps)

.PHONY: rel deps

all: deps compile

compile:
rebar compile

deps:
rebar get-deps

clean:
rebar clean

realclean: clean
rebar delete-deps

test:
rebar skip_deps=true eunit

rel: deps
rebar compile generate

doc:
rebar skip_deps=true doc
for app in $(APPS); do \
cp -R apps/$${app}/doc doc/$${app}; \
done;
11 changes: 11 additions & 0 deletions project_README
@@ -0,0 +1,11 @@
h1. {{project_name}}

{{description}}

h2. Author(s)

* {{author_name}} <{{author_email}}>

h2. Copyright

Copyright (c) {{copyright_year}} {{author_name}} <{{author_email}}>. All rights reserved.
4 changes: 4 additions & 0 deletions project_gitignore
@@ -0,0 +1,4 @@
ebin/*
*.beam
deps/*

11 changes: 11 additions & 0 deletions project_rebar.config
@@ -0,0 +1,11 @@
{lib_dirs, []}.
{erl_first_files, []}.
{erl_opts, [{i, "include"}, {src_dirs, ["src"]}]}.
{erlydtl_opts, []}.
{cover_enabled, true}.
{clean_files, ["ebin/*.beam", "priv/log/*", "rel/*"]}.
{target, "rel"}.
{app_bin, []}.
{deps_dir, ["deps"]}.
%%{deps, [{eunit, "\.*", {hg, "", "tip"}}]}.
{sub_dirs, []}.

0 comments on commit f16e930

Please sign in to comment.