MAD

HELP

MAD accepts a list of words. This list of words contains special words, delimiters or commands. Words between commands are arguments for the nearest command from left.

$ mad MAD Manage Dependencies ad426a invoke = mad | mad list list = [] | command [options] list command = app [web|mqtt] <name> | deps | clean | compile | strip | bundle [beam|script] <name> | get <repo> | up [name] | start | stop | attach | repl | static <min>

APP

Create predefined sample application. MAD has built-in two sample applications: web and mqtt.

$ mad app web sample Created: "sample/sys.config" Created: "sample/apps/sample/priv/static/spa/index.htm" Created: "sample/apps/sample/rebar.config" Created: "sample/apps/sample/priv/templates/index.html" Created: "sample/apps/sample/src/sample.erl" Created: "sample/rebar.config" Created: "sample/apps/sample/src/index.erl" Created: "sample/apps/rebar.config" Created: "sample/vm.args" Created: "sample/apps/sample/src/sample.app.src" Created: "sample/apps/sample/priv/static/synrc.css" Created: "sample/apps/sample/src/routes.erl" OK

DEPS

$ cd sample $ cat rebar.config {sub_dirs,["apps"]}. {deps_dir,"deps"}. {deps, [ {erlydtl,".*", {git, "git://github.com/voxoz/erlydtl", [] }}, {cowboy, ".*", {git, "git://github.com/voxoz/cowboy", [] }}, {gproc, ".*", {git, "git://github.com/voxoz/gproc", [] }}, {fs, ".*", {git, "git://github.com/synrc/fs", {tag, "4.10"} }}, {sh, ".*", {git, "git://github.com/synrc/sh", {tag, "2.10"} }}, {mad, ".*", {git, "git://github.com/synrc/mad", {tag, "4.10"} }}, {active, ".*", {git, "git://github.com/synrc/active", {tag, "4.10"} }}, {nitro, ".*", {git, "git://github.com/synrc/nitro", {tag, "3.10"} }}, {n2o, ".*", {git, "git://github.com/synrc/n2o", {tag, "5.10"} }} ]}
$ mad deps ==> dependency: "git://github.com/voxoz/erlydtl" tag: [] ==> dependency: "git://github.com/voxoz/cowlib" tag: [] ==> dependency: "git://github.com/voxoz/ranch" tag: [] ==> dependency: "git://github.com/voxoz/gproc" tag: [] ==> dependency: "git://github.com/synrc/fs" tag: {tag,"4.10"} ==> dependency: "git://github.com/synrc/sh" tag: {tag,"2.10"} ==> dependency: "git://github.com/synrc/mad" tag: {tag,"4.10"} ==> dependency: "git://github.com/synrc/active" tag: {tag,"4.10"} ==> dependency: "git://github.com/synrc/nitro" tag: {tag,"3.10"} ==> dependency: "git://github.com/synrc/n2o" tag: {tag,"5.10"} OK

GET

$ mad get kvx ==> dependency: "https://github.com/synrc/kvx" tag: [] OK

UP

$ mad up OK

CLEAN

$ mad clean OK

START

$ mad start Scripting: "/Users/maxim/depot/synrc/mad/mad" OK

ATTACH

$ $(mad attach) Attaching to . (^D to exit) 1>

STOP

$ $(mad stop) Attaching to . (^D to exit) [EOF]

COMPILE

$ mad compile Writing /apps/sample/ebin/sample.app OK

PLAN

$ mad plan OK

STRIP

$ mad strip OK

BUNDLE

$ mad bundle script sample OK
$ mad bundle beam sample OK

REPL

$ mad repl $ open http://127.0.0.1:8001/app/index.htm

ARTICLES