index.html 8.1 KB

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