index.html 8.9 KB

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