index.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <html><head><meta charset="utf-8" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  2. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="description" content="" />
  3. <meta name="author" content="Maxim Sokhatsky" /><title>MAD</title>
  4. <link rel="stylesheet" href="https://n2o.dev/blank.css" />
  5. <link rel="stylesheet" href="https://n2o.dev/zima.css" />
  6. </head><body><nav>
  7. <a href="https://n2o.dev">DEV</a>
  8. <a href="https://mad.n2o.space" style="background:#ededed;">MAD</a>
  9. </nav><header>
  10. <a href="https://github.com/synrc/mad"><img src="https://synrc.space/images/Synrc Neo.svg?v=1" /></a>
  11. <h1>MAD</h1>
  12. </header><aside>
  13. <article>
  14. <section>
  15. <h3>SYNOPSIS</h3>
  16. <div>MAD is a small and fast rebar replacement.
  17. </div>
  18. </section>
  19. <section>
  20. <a name="install"></a><h3>INSTALL</h3>
  21. <div>Place MAD binary into <b>$PATH</b> or <b>/usr/local/bin</b>. E.g. using curl:</div><br/>
  22. <figure>
  23. <code> $ curl -fsSL \
  24. https://git.io/fpYm4 \
  25. > mad &#38;&#38; chmod +x mad \
  26. &#38;&#38; sudo cp mad /usr/local/bin</code>
  27. </figure><br/>
  28. <div>
  29. APR 2018 © <a href="https://github.com/5HT">Namdak Tonpa</a> ISC<br />
  30. VER 5.4 4.11 4.10
  31. </div>
  32. </section>
  33. </article>
  34. </aside><main>
  35. <section>
  36. <a name="docs"></a><h3>HELP</h3>
  37. <p> MAD accepts a list of words. This list of words contains special words,
  38. delimiters or commands.
  39. Words between commands are arguments for the nearest command from left.
  40. </p>
  41. <figure><code>
  42. MAD Manage Dependencies 5.4-14-g7810b8d
  43. invoke = mad | mad list
  44. list = [] | command [options] list
  45. command = app [zero|nitro] <name> | deps | clean | compile | strip
  46. | bundle [beam|script] <name> | man | get <repo> | up [name]
  47. | start | stop | attach | repl | static <min>
  48. </min></repo></name></name></code></figure>
  49. <div>
  50. <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>
  51. </div>
  52. </section>
  53. <section>
  54. <a name="app"></a><h3>APP</h3>
  55. <p>Create predefined sample application.
  56. MAD has built-in two sample applications: <b>web</b> and <b>mqtt</b>. </p>
  57. <figure><code>
  58. $ mad app web sample
  59. Created: "sample/sys.config"
  60. Created: "sample/apps/sample/priv/static/spa/index.htm"
  61. Created: "sample/apps/sample/rebar.config"
  62. Created: "sample/apps/sample/priv/templates/index.html"
  63. Created: "sample/apps/sample/src/sample.erl"
  64. Created: "sample/rebar.config"
  65. Created: "sample/apps/sample/src/index.erl"
  66. Created: "sample/apps/rebar.config"
  67. Created: "sample/vm.args"
  68. Created: "sample/apps/sample/src/sample.app.src"
  69. Created: "sample/apps/sample/priv/static/synrc.css"
  70. Created: "sample/apps/sample/src/routes.erl"
  71. OK
  72. </code></figure>
  73. <div>
  74. <ul><li><b><a href="man/mad_static.htm">mad_static</a></b> — MAD Static<div class="desk">: SKELETONS, MINIFIER</div></li></ul>
  75. </div>
  76. </section>
  77. <section>
  78. <a name="deps"></a><h3>DEPS</h3>
  79. <div>
  80. <figure><code>
  81. $ cd sample
  82. $ cat rebar.config
  83. {sub_dirs,["apps"]}.
  84. {deps_dir,"deps"}.
  85. {deps, [
  86. {erlydtl,".*", {git, "git://github.com/voxoz/erlydtl", [] }},
  87. {cowboy, ".*", {git, "git://github.com/voxoz/cowboy", [] }},
  88. {gproc, ".*", {git, "git://github.com/voxoz/gproc", [] }},
  89. {fs, ".*", {git, "git://github.com/synrc/fs", {tag, "4.10"} }},
  90. {sh, ".*", {git, "git://github.com/synrc/sh", {tag, "2.10"} }},
  91. {mad, ".*", {git, "git://github.com/synrc/mad", {tag, "4.10"} }},
  92. {active, ".*", {git, "git://github.com/synrc/active", {tag, "4.10"} }},
  93. {nitro, ".*", {git, "git://github.com/synrc/nitro", {tag, "3.10"} }},
  94. {n2o, ".*", {git, "git://github.com/synrc/n2o", {tag, "5.10"} }}
  95. ]}
  96. </code></figure>
  97. <figure><code>
  98. $ mad deps
  99. ==> dependency: "git://github.com/voxoz/erlydtl" tag: []
  100. ==> dependency: "git://github.com/voxoz/cowlib" tag: []
  101. ==> dependency: "git://github.com/voxoz/ranch" tag: []
  102. ==> dependency: "git://github.com/voxoz/gproc" tag: []
  103. ==> dependency: "git://github.com/synrc/fs" tag: {tag,"4.10"}
  104. ==> dependency: "git://github.com/synrc/sh" tag: {tag,"2.10"}
  105. ==> dependency: "git://github.com/synrc/mad" tag: {tag,"4.10"}
  106. ==> dependency: "git://github.com/synrc/active" tag: {tag,"4.10"}
  107. ==> dependency: "git://github.com/synrc/nitro" tag: {tag,"3.10"}
  108. ==> dependency: "git://github.com/synrc/n2o" tag: {tag,"5.10"}
  109. OK
  110. </code></figure>
  111. </div>
  112. <a name="get"></a><h3>GET</h3>
  113. <figure><code>
  114. $ mad get kvx
  115. ==> dependency: "https://github.com/synrc/kvx" tag: []
  116. OK
  117. </code></figure>
  118. <a name="up"></a><h3>UP</h3>
  119. <figure><code>
  120. $ mad up
  121. OK
  122. </code></figure>
  123. <div>
  124. <ul><li><b><a href="man/mad_git.htm">mad_git</a></b> — MAD Git</li></ul></div>
  125. </section>
  126. <section>
  127. <a name="clean"></a><h3>CLEAN</h3>
  128. <div>
  129. <figure><code>
  130. $ mad clean
  131. OK
  132. </code></figure>
  133. </div>
  134. <a name="start"></a><h3>START</h3>
  135. <figure><code>
  136. $ mad start
  137. Scripting: "/Users/maxim/depot/synrc/mad/mad"
  138. OK
  139. </code></figure>
  140. <a name="attach"></a><h3>ATTACH</h3>
  141. <figure><code>
  142. $ $(mad attach)
  143. Attaching to . (^D to exit)
  144. 1>
  145. </code></figure>
  146. <a name="stop"></a><h3>STOP</h3>
  147. <figure><code>
  148. $ eval $(mad stop)
  149. Attaching to . (^D to exit)
  150. [EOF]
  151. </code></figure>
  152. <div>
  153. <ul><li><b><a href="man/mad_run.htm">mad_run</a></b> — MAD Runner</li></ul></div>
  154. </section>
  155. <section>
  156. <a name="compile"></a><h3>COMPILE</h3>
  157. <figure><code>
  158. $ mad compile
  159. Writing /apps/sample/ebin/sample.app
  160. OK
  161. </code></figure>
  162. <div>
  163. <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>
  164. </div>
  165. </section>
  166. <section>
  167. <a name="plan"></a><h3>PLAN</h3>
  168. <figure><code>
  169. $ mad plan
  170. OK
  171. </code></figure>
  172. <a name="strip"></a><h3>STRIP</h3>
  173. <figure><code>
  174. $ mad strip
  175. OK
  176. </code></figure>
  177. <a name="bundle"></a><h3>BUNDLE</h3>
  178. <figure><code>
  179. $ mad bundle script sample
  180. OK
  181. </code></figure>
  182. <figure><code>
  183. $ mad bundle beam sample
  184. OK
  185. </code></figure>
  186. <div>
  187. <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>
  188. </div>
  189. </section>
  190. <section>
  191. <a name="repl"></a><h3>REPL</h3>
  192. <figure><code>
  193. $ mad repl
  194. $ open http://127.0.0.1:8001/app/index.htm
  195. </code></figure>
  196. <div>
  197. <ul><li><b><a href="man/mad_repl.htm">mad_repl</a></b> — MAD REPL</li></ul></div>
  198. </section>
  199. <section>
  200. <a name="articles"></a><h3>ARTICLES</h3>
  201. <div>
  202. <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>
  203. </section>
  204. </main><footer>
  205. Made with <span class="heart">❤</span> to N2O
  206. </footer></body></html>