标签:style blog http io ar 使用 sp 文件 on
https://github.com/rebar/rebar/wiki
本章原文:
https://github.com/rebar/rebar/wiki/Getting-started
Rebar 是功能丰富的 Erlang 构建工具。用于Erlang/OTP项目的编译,测试,依赖管理,打包发布等。
Rebar 是自包含的脚本,可以方便地嵌入到项目中。$ git clone git://github.com/rebar/rebar.git $ cd rebar $ ./bootstrap查看命令说明:
$ ./rebar -c $ ./rebar help clean
$ mkdir myapp $ cd myapp
$ cp ../rebar/rebar .
$ ./rebar create-app appid=myapp $ touch rebar.config
$ ./rebar compile
$ ./rebar clean
-export([start/2, stop/1]). 后面添加:
%% eunit testing -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif.
%% eunit testing -ifdef(TEST). simple_test() -> ok = application:start(myapp), ?assertNot(undefined == whereis(myapp_sup)). -endif.
$ ./rebar compile eunit
{cover_enabled, true}.
$ rebar compile eunit
标签:style blog http io ar 使用 sp 文件 on
原文地址:http://blog.csdn.net/ubuntu64fan/article/details/41644773