-
Notifications
You must be signed in to change notification settings - Fork 53
/
index.html
253 lines (247 loc) · 8.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<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://n2o.dev/blank.css"/>
<link rel="stylesheet" href="https://n2o.dev/zima.css"/>
</head>
<body>
<nav>
<a href="https://n2o.dev">DEV</a>
<a href="#" style="background:#ededed;">MAD</a>
<div class="dropdown">
<a onclick="drop()" class="dropbtn">EN</a>
<div id="dropdown" class="dropdown-content">
<a href="https://n2o.dev/deps/mad/man/ua/index.html">UA</a>
<a href="https://mad.n2o.dev/">EN</a>
</div>
</div>
</nav>
<header>
<a href="https://github.com/synrc/mad">
<img src="https://openmoji.org/data/color/svg/26A1.svg"/></a>
<h1>MAD</h1>
</header>
<aside>
<article>
<section>
<h3>SYNOPSIS</h3>
<div>MAD is a small and fast build tool for Erlang.
Here is example of config file of MAD itself:</div><br/>
<figure>
<code>
{deps_dir,"deps"}.
{erl_opts,[nowarn_export_all]}.
{deps,[{sh,".*",{git,
"git://github.com/synrc/sh",
{branch, "master"}}}]}.
</code>
</figure><br/>
</section>
<section>
<a name="install"></a><h3>INSTALL</h3>
<div>Place MAD binary into <b>$PATH</b> or
<b>/usr/local/bin</b>. E.g. using curl:</div><br/>
<figure>
<code> $ curl -fsSL \
https://git.io/fpYm4 \
> mad && chmod +x mad \
&& sudo cp mad /usr/local/bin</code>
</figure><br/>
<div>
JAN 2020 © <a href="https://github.com/5HT">Namdak Tonpa</a> ISC<br/>
VER 7.1 6.8 5.4
</div>
</section>
</article>
</aside><main>
<section>
<h3>HELP</h3>
<p> MAD accepts a list of words.
This list of words contains special words aka delimiters or commands.
Words between commands are arguments for the nearest command from left.
</p>
<figure><code>
MAD Manage Dependencies 5.4-14-g7810b8d
invoke = mad | mad list
list = [] | command [options] list
command = app [zero|nitro] <name> | deps | clean | compile | strip
| bundle [beam|script] <name> | man | get <repo> | up [name]
| start | stop | attach | repl | static <min>
</min></repo></name></name></code></figure>
<div>
<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>
</div>
</section>
<section>
<a name="app"></a><h3>APP</h3>
<p>Create predefined sample application.
MAD has built-in two sample applications: <b>zero</b> and <b>nitro</b>.
Here is bluepring of <b>zero</b> application:</p>
<figure><code>
$ mad app zero sample
OK
</code></figure>
<p>sample.app.src</p>
<figure><code>
{application, sample,
[{description, "sample application"},
{vsn, "0.8.0"},
{registered, []},
{applications, [kernel,stdlib]},
{mod, { sample, []}},
{env, []}]}.
</code></figure>
<p>sample.erl</p>
<figure><code>
-module(sample).
-compile(export_all).
-behaviour(application).
-behaviour(supervisor).
-export([start/2, stop/1, init/1]).
start(_, _) -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
stop(_) -> ok.
init([]) -> {ok, { {one_for_one, 5, 10}, []} }.
</code></figure>
<div>
<ul><li><b><a href="man/mad_static.htm">mad_static</a></b> — MAD Static</li></ul>
</div>
</section>
<section>
<a name="deps"></a><h3>DEPS</h3>
<div>
<figure><code>
$ cd sample
$ cat rebar.config
{sub_dirs,["apps"]}.
{deps_dir,"deps"}.
{deps, [
{erlydtl,".*", {git, "git://github.com/voxoz/erlydtl", [] }},
{cowboy, ".*", {git, "git://github.com/voxoz/cowboy", [] }},
{gproc, ".*", {git, "git://github.com/voxoz/gproc", [] }},
{fs, ".*", {git, "git://github.com/synrc/fs", {tag, "4.10"} }},
{sh, ".*", {git, "git://github.com/synrc/sh", {tag, "2.10"} }},
{mad, ".*", {git, "git://github.com/synrc/mad", {tag, "4.10"} }},
{active, ".*", {git, "git://github.com/synrc/active", {tag, "4.10"} }},
{nitro, ".*", {git, "git://github.com/synrc/nitro", {tag, "3.10"} }},
{n2o, ".*", {git, "git://github.com/synrc/n2o", {tag, "5.10"} }}
]}
</code></figure>
<figure><code>
$ mad deps
==> dependency: "git://github.com/voxoz/erlydtl" tag: []
==> dependency: "git://github.com/voxoz/cowlib" tag: []
==> dependency: "git://github.com/voxoz/ranch" tag: []
==> dependency: "git://github.com/voxoz/gproc" tag: []
==> dependency: "git://github.com/synrc/fs" tag: {tag,"4.10"}
==> dependency: "git://github.com/synrc/sh" tag: {tag,"2.10"}
==> dependency: "git://github.com/synrc/mad" tag: {tag,"4.10"}
==> dependency: "git://github.com/synrc/active" tag: {tag,"4.10"}
==> dependency: "git://github.com/synrc/nitro" tag: {tag,"3.10"}
==> dependency: "git://github.com/synrc/n2o" tag: {tag,"5.10"}
OK
</code></figure>
</div>
<a name="get"></a><h3>GET</h3>
<figure><code>
$ mad get kvx
==> dependency: "https://github.com/synrc/kvx" tag: []
OK
</code></figure>
<a name="up"></a><h3>UP</h3>
<figure><code>
$ mad up
OK
</code></figure>
<div>
<ul><li><b><a href="man/mad_git.htm">mad_git</a></b> — MAD Git</li></ul></div>
</section>
<section>
<a name="clean"></a><h3>CLEAN</h3>
<div>
<figure><code>
$ mad clean
OK
</code></figure>
</div>
<a name="start"></a><h3>START</h3>
<figure><code>
$ mad start
Scripting: "/Users/maxim/depot/synrc/mad/mad"
OK
</code></figure>
<a name="attach"></a><h3>ATTACH</h3>
<figure><code>
$ $(mad attach)
Attaching to . (^D to exit)
1>
</code></figure>
<a name="stop"></a><h3>STOP</h3>
<figure><code>
$ eval $(mad stop)
Attaching to . (^D to exit)
[EOF]
</code></figure>
<div>
<ul><li><b><a href="man/mad_run.htm">mad_run</a></b> — MAD Runner</li></ul></div>
</section>
<section>
<a name="compile"></a><h3>COMPILE</h3>
<figure><code>
$ mad compile
Writing /apps/sample/ebin/sample.app
OK
</code></figure>
<div>
<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>
</div>
</section>
<section>
<a name="plan"></a><h3>PLAN</h3>
<figure><code>
$ mad plan
OK
</code></figure>
<a name="strip"></a><h3>STRIP</h3>
<figure><code>
$ mad strip
OK
</code></figure>
<a name="bundle"></a><h3>BUNDLE</h3>
<figure><code>
$ mad bundle script sample
OK
</code></figure>
<figure><code>
$ mad bundle beam sample
OK
</code></figure>
<div>
<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>
</div>
</section>
<section>
<a name="repl"></a><h3>REPL</h3>
<figure><code>
$ mad repl
$ open http://127.0.0.1:8001/app/index.htm
</code></figure>
<div>
<ul><li><b><a href="man/mad_repl.htm">mad_repl</a></b> — MAD REPL</li></ul></div>
</section>
<section>
<a name="articles"></a><h3>ARTICLES</h3>
<div>
<ul><li><a href="https://n2o.dev/articles/n2o.htm">N2O: PROTOCOL</a></li>
<li><a href="https://n2o.dev/articles/web.htm">N2O: SERVER</a></li>
<li><a href="https://n2o.dev/articles/history.htm">N2O: HISTORY</a></li></ul></div>
</section>
</main><footer>
Made with <span class="heart">❤</span> to N2O
</footer>
<script>function drop(){document.getElementById("dropdown").classList.toggle("show");}</script>
</body></html>