/doc/modules/mod_development/mod_development.html

http://github.com/zotonic/zotonic · HTML · 124 lines · 104 code · 20 blank · 0 comment · 0 complexity · bd3554f45068ed609e52cd0b1d710555 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Module mod_development</title>
  5. <link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
  6. </head>
  7. <body bgcolor="white">
  8. <div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
  9. <hr>
  10. <h1>Module mod_development</h1>
  11. <ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Development server.
  12. <p>Copyright Š 2009 Marc Worrell
  13. Date: 2009-11-01</p>
  14. <p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
  15. <p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>), Bryan Fink (<a href="mailto:bryan@basho.com"><tt>bryan@basho.com</tt></a>).</p>
  16. <h2><a name="description">Description</a></h2>Development server. Periodically performs a "make" and loads new files.
  17. When new files are loaded the caches are emptied.
  18. <h2><a name="index">Function Index</a></h2>
  19. <table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td>Convert process state when code is changed.</td></tr>
  20. <tr><td valign="top"><a href="#debug_stream-3">debug_stream/3</a></td><td>Stream specific debug information to an area on the current page.</td></tr>
  21. <tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td>Trap unknown calls.</td></tr>
  22. <tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td></td></tr>
  23. <tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td>Periodic check if the dev server is still running.</td></tr>
  24. <tr><td valign="top"><a href="#init-1">init/1</a></td><td>Initiates the server.</td></tr>
  25. <tr><td valign="top"><a href="#make-1">make/1</a></td><td></td></tr>
  26. <tr><td valign="top"><a href="#observe_debug_stream-2">observe_debug_stream/2</a></td><td>Stream all debug information of a certain kind to the target id on the user agent.</td></tr>
  27. <tr><td valign="top"><a href="#page_debug_stream-3">page_debug_stream/3</a></td><td>Process started and linked to the current page, subscribes to debug notifications.</td></tr>
  28. <tr><td valign="top"><a href="#page_debug_stream_loop-3">page_debug_stream_loop/3</a></td><td></td></tr>
  29. <tr><td valign="top"><a href="#pid_observe_development_make-3">pid_observe_development_make/3</a></td><td></td></tr>
  30. <tr><td valign="top"><a href="#pid_observe_development_reload-3">pid_observe_development_reload/3</a></td><td></td></tr>
  31. <tr><td valign="top"><a href="#reload-1">reload/1</a></td><td></td></tr>
  32. <tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td>Starts the server.</td></tr>
  33. <tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td>This function is called by a gen_server when it is about to
  34. terminate.</td></tr>
  35. </table>
  36. <h2><a name="functions">Function Details</a></h2>
  37. <h3 class="function"><a name="code_change-3">code_change/3</a></h3>
  38. <div class="spec">
  39. <p><tt>code_change(OldVsn, State, Extra) -&gt; {ok, NewState}</tt></p>
  40. </div><p>Convert process state when code is changed</p>
  41. <h3 class="function"><a name="debug_stream-3">debug_stream/3</a></h3>
  42. <div class="spec">
  43. <p><tt>debug_stream(TargetId, What, Context) -&gt; any()</tt></p>
  44. </div><p>Stream specific debug information to an area on the current page.</p>
  45. <h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
  46. <div class="spec">
  47. <p><tt>handle_call(Message::Request, From, State) -&gt; {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}</tt></p>
  48. </div><p>Trap unknown calls</p>
  49. <h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
  50. <div class="spec">
  51. <p><tt>handle_cast(Message::Msg, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
  52. </div>
  53. <h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
  54. <div class="spec">
  55. <p><tt>handle_info(Info, State) -&gt; {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}</tt></p>
  56. </div><p>Periodic check if the dev server is still running.</p>
  57. <h3 class="function"><a name="init-1">init/1</a></h3>
  58. <div class="spec">
  59. <p><tt>init(Args) -&gt; {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}</tt></p>
  60. </div><p>Initiates the server.</p>
  61. <h3 class="function"><a name="make-1">make/1</a></h3>
  62. <div class="spec">
  63. <p><tt>make(Context) -&gt; any()</tt></p>
  64. </div>
  65. <h3 class="function"><a name="observe_debug_stream-2">observe_debug_stream/2</a></h3>
  66. <div class="spec">
  67. <p><tt>observe_debug_stream(Debug_stream, Context) -&gt; any()</tt></p>
  68. </div><p>Stream all debug information of a certain kind to the target id on the user agent.</p>
  69. <h3 class="function"><a name="page_debug_stream-3">page_debug_stream/3</a></h3>
  70. <div class="spec">
  71. <p><tt>page_debug_stream(TargetId, What, Context) -&gt; any()</tt></p>
  72. </div><p>Process started and linked to the current page, subscribes to debug notifications</p>
  73. <h3 class="function"><a name="page_debug_stream_loop-3">page_debug_stream_loop/3</a></h3>
  74. <div class="spec">
  75. <p><tt>page_debug_stream_loop(TargetId, What, Context) -&gt; any()</tt></p>
  76. </div>
  77. <h3 class="function"><a name="pid_observe_development_make-3">pid_observe_development_make/3</a></h3>
  78. <div class="spec">
  79. <p><tt>pid_observe_development_make(Pid, X2, Context) -&gt; any()</tt></p>
  80. </div>
  81. <h3 class="function"><a name="pid_observe_development_reload-3">pid_observe_development_reload/3</a></h3>
  82. <div class="spec">
  83. <p><tt>pid_observe_development_reload(Pid, X2, Context) -&gt; any()</tt></p>
  84. </div>
  85. <h3 class="function"><a name="reload-1">reload/1</a></h3>
  86. <div class="spec">
  87. <p><tt>reload(Context) -&gt; any()</tt></p>
  88. </div>
  89. <h3 class="function"><a name="start_link-1">start_link/1</a></h3>
  90. <div class="spec">
  91. <p><tt>start_link(Args) -&gt; {ok, Pid} | ignore | {error, Error}</tt></p>
  92. </div><p>Starts the server</p>
  93. <h3 class="function"><a name="terminate-2">terminate/2</a></h3>
  94. <div class="spec">
  95. <p><tt>terminate(Reason, State) -&gt; <a href="#type-void">void()</a></tt></p>
  96. </div><p>This function is called by a gen_server when it is about to
  97. terminate. It should be the opposite of Module:init/1 and do any necessary
  98. cleaning up. When it returns, the gen_server terminates with Reason.
  99. The return value is ignored.</p>
  100. <hr>
  101. <div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
  102. <p><i>Generated by EDoc, Oct 13 2011, 14:45:57.</i></p>
  103. </body>
  104. </html>