commands.tex 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. \section{Commands}
  2. Synrc mad has a simple interface as follows:
  3. \vspace{1\baselineskip}
  4. \begin{lstlisting}
  5. BNF:
  6. invoke := mad params
  7. params := [] | run params
  8. run := command [ options ]
  9. command := app | lib | deps | compile | bundle
  10. start | stop | repl
  11. \end{lstlisting}
  12. \vspace{1\baselineskip}
  13. It seems to us more natural, you can specify random
  14. commands set with different specifiers (options).
  15. \subsection{deps}
  16. In rebar-like managers we are selecting deps from rebar.config:
  17. \vspace{1\baselineskip}
  18. \begin{lstlisting}
  19. {sub_dirs,["apps"]}.
  20. {deps_dir,"deps"}.
  21. {deps, [active,{nitro,"2.9"},{n2o,"2.9"}]}.
  22. \end{lstlisting}
  23. \vspace{1\baselineskip}
  24. \subsection{compile, com}
  25. Performs compilation of all known compilations backends in complilation profile of mad:
  26. \vspace{1\baselineskip}
  27. \begin{lstlisting}
  28. 1. mad_app — app.src erlang templating.
  29. 2. mad_dtl — DTL compiler.
  30. 3. mad_erl — BEAM compiler.
  31. 4. mad_port — for gcc cland and other native compilation.
  32. 5. mad_script — .script file used in projects like gproc.
  33. 6. mad_yecc/mad_leex — DSL language parser compilers.
  34. 7. mad_upl — UPL compiler.
  35. \end{lstlisting}
  36. \vspace{1\baselineskip}
  37. \subsection{pla}
  38. Taking all dependecies and resolve boot sequence according to dependecy order. Storing this value in .applist.
  39. \vspace{1\baselineskip}
  40. \begin{lstlisting}
  41. Ordered: [kernel,stdlib,fs,ranch,crypto,compiler,syntax_tools,
  42. gproc,cowlib,cowboy,n2o,sample,active,erlydtl,jsone,
  43. mad,nitro,sh]
  44. \end{lstlisting}
  45. \vspace{1\baselineskip}
  46. \subsection{repl}
  47. \subsection{bundle}
  48. \subsection{app}