Cake.Graph

What is it?

Cake.Graph is an alias for Cake to create a html page to allow viewing all Cake Tasks and their dependencies from Cake build scripts. It is intended to be used alongside Wyam, producing Mermaid syntax which Wyam natively supports, but can be used independently to create a simple page viewable in a browser.

Mermaid - Wyam

The default generator can be deployed with the following command

Graph(Tasks).Deploy();
Mermaid in a wyam page

Mermaid

This command will produce individual html files which link to a CDN to get the mermaid javascript source. The CDN url can be overriden using the settings.

Graph(Tasks).Deploy(s => s.WithMermaidHtmlGenerator());
Mermaid

Cytoscape

If you prefer to use Cytoscape syntax then use the WithCytoscapeHtmlGenerator extension method on the settings used with the Deploy command as follows. The cytoscape javascript source can be changed with the settings

Graph(Tasks).Deploy(s => s.WithCytoscapeHtmlGenerator());
Cytoscape

If you wish to generate cytoscape syntax files for use elsewhere then use the WithCytoscapeGenerator extension method. This will output json files containing ctyoscape syntax for each of the tasks.

[ { "data": { "id": "Default", "source": null, "target": null } }, { "data": { "id": "261ca3c8-ace6-4d36-aa34-16bf767b7742", "source": "Default", "target": "Package" } }, { "data": { "id": "Package", "source": null, "target": null } }, ...

Scope

The project will output files that can be used with any http server and with Wyam.