Chunks drive the process of creating a webroot from an input directory.
Each chunk takes as arguments the settings, environment, and publishable objects and returns a new environment, a new set of objects, and a set of chunks that should be called in the future.
Note
It must be the case that new chunks are scheduled such that they are called after the current chunk.
In this way, the flow of the application may be dynamically modified at the higher level without placing many strict requirements on what is possible. The best practices that should be observed include:
- A chunk should have a default policy of passing objects unchanged. Only objects that the chunk is intended to modify should be modified by the chunks.
- The same default-unchanged policy should apply to passing the non-object environment.
- New chunks should have a scheduling order such that they are executed after the current chunk.
Bases: object
An AbstractChunk defines the interface for all chunks.
scheduling_order is a positive integer that determines chunk execution order.
scheduling_order uses normal integer comparison. Chunks of the same priority will be executed in arbitrary order.