index.html 8.7 KB

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