$procache->script() method

Generate an HTML javascript <script> tag with the given files merged

Usage

// basic usage
$string = $procache->script($files);

// usage with all arguments
$string = $procache->script($files, bool $minify = true, string $type = '');

Arguments

NameType(s)Description
filesarray, string, WireArray
minify (optional)bool

(default=true)

type (optional)string

Optionally specify type "defer" or "async"

Return value

string

With merged file URL


$procache methods and properties

API reference based on ProcessWire core version 3.0.244

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull