Namdak Tonpa 10 years ago
parent
commit
ed5cdd63f8
11 changed files with 95 additions and 9 deletions
  1. 21 0
      doc/bundles.tex
  2. 30 0
      doc/commands.tex
  3. 42 0
      doc/deps.tex
  4. 2 2
      doc/setup.tex
  5. 0 1
      doc/web/bundles.tex
  6. 0 1
      doc/web/commands.tex
  7. 0 1
      doc/web/config.tex
  8. 0 1
      doc/web/deps.tex
  9. 0 1
      doc/web/ports.tex
  10. 0 1
      doc/web/scripts.tex
  11. 0 1
      doc/web/setup.tex

+ 21 - 0
doc/bundles.tex

@@ -0,0 +1,21 @@
+\section{Bundles}
+
+\subsection{Single-File Bundles with MAD}
+
+The key feature of mad is ability to create single-file bundled web sites.
+Thus making dream to boot simpler than node.js come true.
+This target escript is ready to run on Windows, Linux and Mac.
+
+To make this possible we implemented a zip filesytem inside escript.
+mad packages priv directories along with ebin and configs.
+You can redefine each file in zip fs inside target
+escript by creation the copy with same path locally near escript.
+After launch all files are copied to ETS.
+N2O also comes with custom cowboy static handler that is able to
+read static files from this cached ETS filesystem.
+Also bundle are compatible with active online realoading and recompilation.
+
+\subsection{Releases with RELX}
+
+\subsection{Re with OTP.MK}
+

+ 30 - 0
doc/commands.tex

@@ -0,0 +1,30 @@
+\section{Commands}
+
+Synrc mad has a simple interface as follows:
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+  BNF:
+      invoke := mad params
+      params := [] | run params
+         run := command [ options ]
+     command := app | lib | deps | compile | bundle
+                start | stop | repl
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+It seems to us more natural, you can specify random
+commands set with different specifiers (options).
+
+\subsection{deps}
+
+\subsection{compile}
+
+\subsection{plan}
+
+\subsection{repl}
+
+\subsection{bundle}
+
+\subsection{app}
+

+ 42 - 0
doc/deps.tex

@@ -0,0 +1,42 @@
+\section{Dependencies}
+
+\subsection{OTP Compliant}
+
+mad supports rebar umbrella project structure.
+Specifically two kinds of directory layouts:
+
+\vspace{1\baselineskip}
+\begin{lstlisting}[caption=Solution]
+    ├── apps
+    ├── deps
+    ├── rebar.config
+    └── sys.config
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+\vspace{1\baselineskip}
+\begin{lstlisting}[caption=OTP Application]
+    ├── deps
+    ├── ebin
+    ├── include
+    ├── priv
+    ├── src
+    └── rebar.config
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+\subsection{Apps Ordering}
+
+As you may know you can create OTP releases with
+reltool (rebar generate) or systools (relx). mad currently
+creates releases with relx but is going to do it independently soon.
+Now it can only order applications.
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+    # mad plan
+    Ordered: [kernel,stdlib,mnesia,kvs,crypto,cowlib,ranch,
+              cowboy,compiler,syntax_tools,erlydtl,gproc,
+              xmerl,n2o,n2o_sample,fs,active,mad,rest,sh]
+\end{lstlisting}
+\vspace{1\baselineskip}

+ 2 - 2
doc/setup.tex

@@ -6,8 +6,8 @@ Fresh version of mad included as a binary in its primary github repository:
 
 
 \vspace{1\baselineskip}
 \vspace{1\baselineskip}
 \begin{lstlisting}
 \begin{lstlisting}
-    # curl -fsSL https://raw.github.com/synrc/mad/master/mad > mad\\
-              && chmod +x mad \\
+    # curl -fsSL https://raw.github.com/synrc/mad/master/mad > mad \
+              && chmod +x mad \
               && sudo cp /usr/local/bin
               && sudo cp /usr/local/bin
 \end{lstlisting}
 \end{lstlisting}
 \vspace{1\baselineskip}
 \vspace{1\baselineskip}

+ 0 - 1
doc/web/bundles.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../bundles}
 \include{../bundles}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}

+ 0 - 1
doc/web/commands.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../commands}
 \include{../commands}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}

+ 0 - 1
doc/web/config.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../config}
 \include{../config}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}

+ 0 - 1
doc/web/deps.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../deps}
 \include{../deps}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}

+ 0 - 1
doc/web/ports.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../ports}
 \include{../ports}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}

+ 0 - 1
doc/web/scripts.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../scripts}
 \include{../scripts}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}

+ 0 - 1
doc/web/setup.tex

@@ -9,7 +9,6 @@
 \input{toc}
 \input{toc}
 %HEVEA \begin{divstyle}{articlecol}
 %HEVEA \begin{divstyle}{articlecol}
 \include{../setup}
 \include{../setup}
-%HEVEA \rawhtmlinput{templates/mad-comments.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \rawhtmlinput{templates/disqus.htx}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}
 %HEVEA \end{divstyle}