compile

Compile the given asset source with duo and optionally minify/uglify the output.

string
compile
(
string source
,
bool js = true
,
string staticdir = "public"
,
bool min = true
)

Parameters

source
Type: string

Source code to pass to compile.

js
Type: bool

If this is javascript or css. Default true for javascript.

staticdir
Type: string

Your statically served asset directory. Default is public/

min
Type: bool

If true the output will be minified/uglifies with yuglify.

Return Value

Type: string

The duo builtsource code without formatting which results in a size decrease.

Meta