Blueprint Language

Exporters are powered by a state-of-the-art templating language called Blazar. Blazar allows you to define exactly how the output will look like, down to the last character.

You might now think - another programming language? Please no! But worry not. We've taken great care of making it as close to already existing templating languages as possible while adding all-new capabilities.

If you've ever developed a react page, used Moustache, Handlebars, or anything similar, you'll feel like home. And if not, you'll master it before you know it - it reads like a book and has developer tools other templating engines can only dream of.

Blazar is simple enough to be understood within minutes, however, when used to its full potential, it can define some truly amazing and crazy complex code generation tasks, such as the entire Flutter Project Exporter (which exports screens, styles, animations, entire project structure and many other things).

Most importantly, Blazar directly communicates with Supernova Universal Data Model and with its computing engine, shielding you from all the internals but giving you full access to all project data.


Let's look at one possible blueprint:

{* Fetch data about all screens in project *}
{[ var screens @project.allScreens() /]}
{* Create screen menu linking to subpages *}
<h1>My Humble Portfolio</h1>
{[ for screen in screens ]}
<li><a href="./Screens/{{ }}.html">{{ }}</a></li>

Blueprint combines template and dynamic data together with code that fetches or transform them. When run, any dynamic part is computed and then the template is executed with the computed data.

In the example above, you can see that first, we create a variable screen using function project.allScreens(), which asks Supernova Universal Data Model to retrieve all screens in the current project.

Then, in the second part of the blueprint, we take that data and iterate on them using for flow, and create an HTML link for each of the screens. Rather simple right? There are hundreds of pre-made functions and transformers (methods that modify the data) to access every part of the Supernova, giving you absolute control over what to do with the data.