tapestry
tapestry copied to clipboard
Incremental Builds
This is related to #167; incremental builds would require that Tapestry follow a more tight definition of Compiler and actually go about parsing into a graph all content and then identifying which graph nodes are affected during a rebuild.
This is quite a complex subject and will involve a lot of refactoring.
The content structure of Tapestry is:
FilebelongsToContentTypeContentTypehasManyTaxonomyFilehasManyTaxonomyFilehasOneTemplateFilehasManyUseTemplatehasOneTemplate(can be many levels deep)
During the Parsing phase of compilation for each File discovered all of the above must be identified in order to build the content graph. One node of which may be:
{
type: 'file',
path: '/index.phtml',
template: '/_templates/default.phtml',
contentType: 'default',
'taxonomy: null
}
The above node is linked to the Template _/templates/default.phtml and the Content Type default. If either of those change then this node will be marked as needs changes too.
This is rather basic and easily achievable by simply parsing all files for Front Matter and building the graph from that - however - Plates allows the usage of partials therefore a single phtml file could include multiple other phtml partial files. The complexity here is identifying the includes.
This may be useful to look at http://gittup.org/tup/build_system_rules_and_algorithms.pdf
Also maybe useful to look at https://github.com/thejameskyle/graph-sequencer