123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <html>
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="description" content="" />
- <meta name="author" content="Maxim Sokhatsky" />
- <title>MAD</title>
- <link rel="stylesheet" href="https://synrc.space/synrc.css" />
- </head>
- <body>
- <nav>
- <a href='https://synrc.space/'>SYNRC</a>
- <a href='https://n2o.space'>N2O ECO</a>
- </nav>
- <header>
- <a href="https://n2o.space"><img src="https://synrc.space/images/Synrc Neo.svg?v=1"></a>
- <h1>MAD</h1>
- </header>
- <aside>
- <article>
- <section>
- <h3>SYNOPSIS</h3>
- <div>MAD is a small and fast rebar replacement.
- </div>
- </section>
- <section>
- <a name=plugin><h3>INSTALL</h3></a>
- <div>Place MAD binary into <b>$PATH</b> or <b>/usr/local/bin</b>. E.g. using curl:
- <figure>
- <code>
- $ curl -fsSL \
- https://git.io/fpYm4 \
- > mad && chmod +x mad \
- && sudo cp mad /usr/local/bin
- </code>
- </figure>
- <div>
- Nov 2018 © <a href="https://github.com/synrc/mad">Namdak Tonpa</a> ISC
- </div>
- </section>
- </article>
- </aside>
- <main>
- <section>
- <a name=mqtt><h3>HELP</h3></a>
- <p> 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.
- </p>
- <figure><code>
- $ 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>
- </code></figure>
- <div>
- <ul>
- <li><b><a href="man/mad.htm">mad</a></b> — MAD Main Module</li>
- <li><b><a href="man/mad_local.htm">mad_local</a></b> — MAD POSIX Profile</li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>APP</h3></a>
- <p>Create predefined sample application.
- MAD has built-in two sample applications: <b>web</b> and <b>mqtt</b>. </p>
- <figure><code>
- $ 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
- </code></figure>
- <div>
- <ul>
- <li><b><a href="man/mad_static.htm">mad_static</a></b> — MAD Static<div class=desk>: SKELETONS, MINIFIER</div></li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>DEPS</h3></a>
- <div>
- <figure><code>
- $ 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"} }}
- ]}
- </code></figure>
- <figure><code>
- $ 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
- </code></figure>
- </div>
- <a name=docs><h3>GET</h3></a>
- <figure><code>
- $ mad get kvx
- ==> dependency: "https://github.com/synrc/kvx" tag: []
- OK
- </code></figure>
- <a name=docs><h3>UP</h3></a>
- <figure><code>
- $ mad up
- OK
- </code></figure>
- <div>
- <ul>
- <li><b><a href="man/mad_git.htm">mad_git</a></b> — MAD Git</div></li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>CLEAN</h3></a>
- <div>
- <figure><code>
- $ mad clean
- OK
- </code></figure>
- </div>
- <a name=docs><h3>START</h3></a>
- <figure><code>
- $ mad start
- Scripting: "/Users/maxim/depot/synrc/mad/mad"
- OK
- </code></figure>
- <a name=docs><h3>ATTACH</h3></a>
- <figure><code>
- $ $(mad attach)
- Attaching to . (^D to exit)
- 1>
- </code></figure>
- <a name=docs><h3>STOP</h3></a>
- <div>
- <ul>
- <li><b><a href="man/mad_run.htm">mad_run</a></b> — MAD Runner</div></li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>COMPILE</h3></a>
- <figure><code>
- $ mad compile
- Writing /apps/sample/ebin/sample.app
- OK
- </code></figure>
- <div>
- <ul>
- <li><b><a href="man/mad_compile.htm">mad_compile</a></b> — MAD Compiler</li>
- <li><b><a href="man/mad_app.htm">mad_app</a></b> — OTP Application files</li>
- <li><b><a href="man/mad_cubical.htm">mad_cubical</a></b> — cubicaltt files</li>
- <li><b><a href="man/mad_dtl.htm">mad_dtl</a></b> — DTL files</li>
- <li><b><a href="man/mad_erl.htm">mad_erl</a></b> — Erlang source files</li>
- <li><b><a href="man/mad_leex.htm">mad_leex</a></b> — Erlang leex files</li>
- <li><b><a href="man/mad_yecc.htm">mad_yecc</a></b> — Erlang yecc files</li>
- <li><b><a href="man/mad_port.htm">mad_port</a></b> — C/C++ files</li>
- <li><b><a href="man/mad_script.htm">mad_script</a></b> — .script files</li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>PLAN</h3></a>
- <figure><code>
- $ mad plan
- OK
- </code></figure>
- <a name=docs><h3>STRIP</h3></a>
- <figure><code>
- $ mad strip
- OK
- </code></figure>
- <a name=docs><h3>BUNDLE</h3></a>
- <figure><code>
- $ mad bundle script sample
- OK
- </code></figure>
- <figure><code>
- $ mad bundle beam sample
- OK
- </code></figure>
- <div>
- <ul>
- <li><b><a href="man/mad_release.htm">mad_release</a></b> — MAD Bundler</li>
- <li><b><a href="man/mad_escript.htm">mad_escript</a></b> — MAD escript bundler</li>
- <li><b><a href="man/mad_systools.htm">mad_systools</a></b> — MAD BEAM release bundler</li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>REPL</h3></a>
- <figure><code>
- $ mad repl
- $ open http://127.0.0.1:8001/app/index.htm
- </code></figure>
- <div>
- <ul>
- <li><b><a href="man/mad_repl.htm">mad_repl</a></b> — MAD REPL</div></li>
- </ul>
- </div>
- </section>
- <section>
- <a name=docs><h3>Related Documents</h3></a>
- <div>
- <ul>
- <li><a href="https://n2o.space/articles/n2o.htm">N2O: PROTOCOL</a></li>
- <li><a href="https://n2o.space/articles/web.htm">N2O: SERVER</a></li>
- <li><a href="https://n2o.space/articles/history.htm">N2O: HISTORY</a></li>
- </ul></div>
- </section>
- </main>
- <footer>
- Made with <span class="heart">❤</span> to N2O
- </footer>
- </body>
- </html>
|