Still.Compiler.CompilationStage (Still v0.3.1) View Source

Almost every compilation request goes through CompilationStage. This process is responsible for keeping track of files to compile and subscriptions (e.g: a browser subscribing to changes) and notifying all the subscribers of the end of the compilation cycle.

Files are compiled in parallel. When no more files are ready to be compiled, the subscribers are notified.

Subscribers to this process are notified when the queue is empty, which is usefull to refresh the browser or finish the compilation task in production.

Subscribers receive the event :bus_empty when CompilationStage's compilation cycle is finished.

There are many events that lead to a file being compiled:

  • when Still starts, all files are compiled;
  • files that change are compiled;
  • files that include files that have changed are compiled;
  • any many more.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Asynchronously pushes a file to the compilation list.

Save a subscription to the compilation cycle.

Remove a subscription to the compilation cycle.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Asynchronously pushes a file to the compilation list.

Save a subscription to the compilation cycle.

Remove a subscription to the compilation cycle.