Require

This template, when instantiated represents a front end asset. The power of this template is in its differing actions from first instantiation compared to all others calls.

When first instantiated this template will check for a command line parameter that matches buildSwitch and if found compile the asset that it describes. In order to easily utilize this asset the template may be used in a mixin inside of a diet template file which will setup the HTML required required to include the compiled asset.

Param: sourcePath = The path to an assets source, relative to the compiled binary.

template Require (
const string sourcePath
) {}

Members

Variables

Require
string Require;

This is the mixin code for diet templates.

staticPath
string staticPath;

Path to the assets source file.

webPath
string webPath;

URL path to this asset from the web.

Meta