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 string

Source code to pass to compile.

js bool

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

staticdir string

Your statically served asset directory. Default is public/

min 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