index.html 8.1 KB

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