Namdak Tonpa 10 years ago
parent
commit
502d33d2d8
10 changed files with 207 additions and 0 deletions
  1. 7 0
      doc/book.tex
  2. 60 0
      doc/setup.tex
  3. 18 0
      doc/web/bundles.tex
  4. 18 0
      doc/web/commands.tex
  5. 18 0
      doc/web/config.tex
  6. 18 0
      doc/web/deps.tex
  7. 18 0
      doc/web/ports.tex
  8. 18 0
      doc/web/scripts.tex
  9. 18 0
      doc/web/setup.tex
  10. 14 0
      doc/web/toc.tex

+ 7 - 0
doc/book.tex

@@ -6,4 +6,11 @@
 % \titleMAD
 \tableofcontents
 \include{index}
+\include{setup}
+\include{config}
+\include{commands}
+\include{scripts}
+\include{deps}
+\include{bundles}
+\include{ports}
 \end{document}

+ 60 - 0
doc/setup.tex

@@ -0,0 +1,60 @@
+\section{Setup}
+
+\subsection{Installing Binary}
+
+Fresh version of mad included as a binary in its primary github repository:
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+    # curl -fsSL https://raw.github.com/synrc/mad/master/mad > mad\\
+              && chmod +x mad \\
+              && sudo cp /usr/local/bin
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+Or you may want to add mad to your PATH.
+
+\subsection{Compiling Sources}
+
+If you want you can compile mad by yourself:
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+    # git clone http://github.com/synrc/mad && cd mad
+    # make
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+Note that mad uses mad to build mad. It's mad.
+
+\subsection{Creating a sample N2O project}
+
+mad also comes with N2O templates. So you can bootstrap a N2O-based site
+just having a single copy of mad binary.
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+    # mad app sample
+    # cd sample
+    # mad deps compile plan bundle web_app
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+After that you can just run escript web_app under Windows, Linux and
+Mac and open \footahref{http://localhost:8000}{http://localhost:8000}.
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+    C:\> escript web_app
+    Applications: [kernel,stdlib,crypto,cowlib,ranch,cowboy,compiler,syntax_tools,
+                   erlydtl,gproc,xmerl,n2o,n2o_sample,fs,active,mad,sh]
+    Configuration: [{n2o,[{port,8000},{route,routes}]},
+                    {kvs,[{dba,store_mnesia},
+                          {schema,[kvs_user,kvs_acl,kvs_feed,kvs_subscription]}]}]
+    Erlang/OTP 17 [erts-6.0] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]
+
+    Eshell V6.0  (abort with ^G)
+    1>
+\end{lstlisting}
+\vspace{1\baselineskip}
+

+ 18 - 0
doc/web/bundles.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Bundles}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../bundles}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 18 - 0
doc/web/commands.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Commands}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../commands}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 18 - 0
doc/web/config.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Config}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../config}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 18 - 0
doc/web/deps.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Deps}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../deps}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 18 - 0
doc/web/ports.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Ports}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../ports}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 18 - 0
doc/web/scripts.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Scripts}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../scripts}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 18 - 0
doc/web/setup.tex

@@ -0,0 +1,18 @@
+\input{../../../../synrc.hva}
+%HEVEA \loadcssfile{../../../../synrc.css}
+\renewcommand{\images}{http://synrc.com/apps/mad/doc/images}
+\begin{document}
+\title{MAD Setup}
+\author{Maxim Sokhatsky}
+%HEVEA \begin{divstyle}{nonselectedwrapper}
+%HEVEA \begin{divstyle}{article}
+\input{toc}
+%HEVEA \begin{divstyle}{articlecol}
+\include{../setup}
+%HEVEA \rawhtmlinput{templates/mad-comments.htx}
+%HEVEA \rawhtmlinput{templates/disqus.htx}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \end{divstyle}
+%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
+\end{document}

+ 14 - 0
doc/web/toc.tex

@@ -0,0 +1,14 @@
+%HEVEA \begin{divstyle}{toc}
+\section*{TOC}
+\paragraph{}
+\footahref{http://synrc.com/apps/mad/doc/web}{Overview} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/setup.htm}{1. Setup} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/config.htm}{2. Configuration} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/commands.htm}{3. Commands} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/scripts.htm}{5. Scripts} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/deps.htm}{4. Dependencies} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/bundles.htm}{6. Bundles} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/ports.htm}{7. Ports} \@br
+
+\footahref{http://synrc.com/apps/mad/doc/book.pdf}{Download PDF} \@br
+%HEVEA \end{divstyle}