index.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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 <repo> | 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. <ul>
  91. <li><b><a href="man/mad_git.htm">mad_git</a></b> &mdash; MAD Git</div></li>
  92. </ul>
  93. <figure><code>
  94. $ cat rebar.config
  95. {sub_dirs,["apps"]}.
  96. {deps_dir,"deps"}.
  97. {deps, [
  98. {erlydtl,".*", {git, "git://github.com/voxoz/erlydtl", [] }},
  99. {cowboy, ".*", {git, "git://github.com/voxoz/cowboy", [] }},
  100. {gproc, ".*", {git, "git://github.com/voxoz/gproc", [] }},
  101. {fs, ".*", {git, "git://github.com/synrc/fs", {tag, "4.10"} }},
  102. {sh, ".*", {git, "git://github.com/synrc/sh", {tag, "2.10"} }},
  103. {mad, ".*", {git, "git://github.com/synrc/mad", {tag, "4.10"} }},
  104. {active, ".*", {git, "git://github.com/synrc/active", {tag, "4.10"} }},
  105. {nitro, ".*", {git, "git://github.com/synrc/nitro", {tag, "3.10"} }},
  106. {n2o, ".*", {git, "git://github.com/synrc/n2o", {tag, "5.10"} }}
  107. ]}
  108. </code></figure>
  109. <figure><code>
  110. $ mad deps
  111. ==> dependency: "git://github.com/voxoz/erlydtl" tag: []
  112. ==> dependency: "git://github.com/voxoz/cowlib" tag: []
  113. ==> dependency: "git://github.com/voxoz/ranch" tag: []
  114. ==> dependency: "git://github.com/voxoz/gproc" tag: []
  115. ==> dependency: "git://github.com/synrc/fs" tag: {tag,"4.10"}
  116. ==> dependency: "git://github.com/synrc/sh" tag: {tag,"2.10"}
  117. ==> dependency: "git://github.com/synrc/mad" tag: {tag,"4.10"}
  118. ==> dependency: "git://github.com/synrc/active" tag: {tag,"4.10"}
  119. ==> dependency: "git://github.com/synrc/nitro" tag: {tag,"3.10"}
  120. ==> dependency: "git://github.com/synrc/n2o" tag: {tag,"5.10"}
  121. OK
  122. </code></figure>
  123. </div>
  124. <a name=docs><h3>GET</h3></a>
  125. <figure><code>
  126. $ mad get kvx
  127. ==> dependency: "https://github.com/synrc/kvx" tag: []
  128. OK
  129. </code></figure>
  130. <a name=docs><h3>UP</h3></a>
  131. <figure><code>
  132. $ mad up
  133. OK
  134. </code></figure>
  135. </section>
  136. <section>
  137. <a name=docs><h3>CLEAN</h3></a>
  138. <div>
  139. <figure><code>
  140. $ mad clean
  141. OK
  142. </code></figure>
  143. </div>
  144. <a name=docs><h3>START</h3></a>
  145. <figure><code>
  146. $ mad start
  147. Scripting: "/Users/maxim/depot/synrc/mad/mad"
  148. OK
  149. </code></figure>
  150. <a name=docs><h3>ATTACH</h3></a>
  151. <figure><code>
  152. $ mad attach
  153. to_erl .
  154. OK
  155. </code></figure>
  156. <a name=docs><h3>STOP</h3></a>
  157. <div>
  158. <ul>
  159. <li><b><a href="man/mad_run.htm">mad_run</a></b> &mdash; MAD Runner</div></li>
  160. </ul>
  161. </div>
  162. </section>
  163. <section>
  164. <a name=docs><h3>COMPILE</h3></a>
  165. <div>
  166. <ul>
  167. <li><b><a href="man/mad_compile.htm">mad_compile</a></b> &mdash; MAD Compiler</li>
  168. <li><b><a href="man/mad_app.htm">mad_app</a></b> &mdash; OTP Application files</li>
  169. <li><b><a href="man/mad_cubical.htm">mad_cubical</a></b> &mdash; cubicaltt files</li>
  170. <li><b><a href="man/mad_dtl.htm">mad_dtl</a></b> &mdash; DTL files</li>
  171. <li><b><a href="man/mad_erl.htm">mad_erl</a></b> &mdash; Erlang source files</li>
  172. <li><b><a href="man/mad_leex.htm">mad_leex</a></b> &mdash; Erlang leex files</li>
  173. <li><b><a href="man/mad_yecc.htm">mad_yecc</a></b> &mdash; Erlang yecc files</li>
  174. <li><b><a href="man/mad_port.htm">mad_port</a></b> &mdash; C/C++ files</li>
  175. <li><b><a href="man/mad_script.htm">mad_script</a></b> &mdash; .script files</li>
  176. </ul>
  177. </div>
  178. <figure><code>
  179. $ mad compile
  180. Writing /apps/sample/ebin/sample.app
  181. OK
  182. </code></figure>
  183. </section>
  184. <section>
  185. <a name=docs><h3>STRIP</h3></a>
  186. <div>
  187. <ul>
  188. <li><b><a href="man/mad_strip.htm">mad_strip</a></b> &mdash; MAD Strip</div></li>
  189. </ul>
  190. </div>
  191. <figure><code>
  192. $ mad strip
  193. OK
  194. </code></figure>
  195. </section>
  196. <section>
  197. <a name=docs><h3>PLAN</h3></a>
  198. <div>
  199. <ul>
  200. <li><b><a href="man/mad_resolve.htm">mad_resolve</a></b> &mdash; MAD Resolver</div></li>
  201. </ul>
  202. </div>
  203. <figure><code>
  204. $ mad plan
  205. Generated [kernel,stdlib,fs,ranch,crypto,compiler,syntax_tools,inets,cowlib,
  206. cowboy,n2o,sample,active,erlydtl,gproc,mad,nitro,sh]
  207. OK
  208. </code></figure>
  209. </section>
  210. <section>
  211. <a name=docs><h3>BUNDLE</h3></a>
  212. <div>
  213. <ul>
  214. <li><b><a href="man/mad_release.htm">mad_release</a></b> &mdash; MAD Bundler</li>
  215. <li><b><a href="man/mad_escript.htm">mad_escript</a></b> &mdash; MAD ESCRIPT</li>
  216. <li><b><a href="man/mad_ling.htm">mad_ling</a></b> &mdash; MAD LING</li>
  217. <li><b><a href="man/mad_systools.htm">mad_systools</a></b> &mdash; MAD BEAM</li>
  218. </ul>
  219. </div>
  220. <figure><code>
  221. $ mad bundle script sample
  222. Generated [kernel,stdlib,fs,ranch,crypto,compiler,syntax_tools,inets,cowlib,
  223. cowboy,n2o,sample,active,erlydtl,gproc,mad,nitro,sh]
  224. OK
  225. </code></figure>
  226. </section>
  227. <section>
  228. <a name=docs><h3>REPL</h3></a>
  229. <div>
  230. <ul>
  231. <li><b><a href="man/mad_repl.htm">mad_repl</a></b> &mdash; MAD REPL</div></li>
  232. </ul>
  233. </div>
  234. <figure><code>
  235. $ mad repl
  236. $ open http://127.0.0.1:8001
  237. </code></figure>
  238. </section>
  239. <section>
  240. <a name=docs><h3>Related Documents</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>