index.html 8.5 KB

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