Documentation

Build extends Injectable
in package

Manage Js builds generation

Table of Contents

$basePath  : string
Path to frontend modules dir
$ext  : string
Extension used for js file
$format  : string
Build format
$importMap  : string
Path to plugin alias bin used for importmap
$rollup  : string
Path to rollup bin
$uglify  : string
Path to uglifyjs bin
__construct()  : mixed
Generate builds for all controllers and actions without any params
exec()  : string
Excute bash command and get the result
globRecursive()  : array<string|int, mixed>
Browse recursivly a folder to get all main files
run()  : void
Build the main file

Properties

$basePath

Path to frontend modules dir

private string $basePath

$ext

Extension used for js file

private string $ext

$format

Build format

private string $format

$importMap

Path to plugin alias bin used for importmap

private string $importMap

$rollup

Path to rollup bin

private string $rollup

$uglify

Path to uglifyjs bin

private string $uglify

Methods

__construct()

Generate builds for all controllers and actions without any params

public __construct([null|string $controller = null ][, null|string $actions = null ]) : mixed
Parameters
$controller : null|string = null
$actions : null|string = null
Return values
mixed

exec()

Excute bash command and get the result

private exec(string $cmd) : string
Parameters
$cmd : string

Command to execute

Return values
string

Result of the command

globRecursive()

Browse recursivly a folder to get all main files

private globRecursive(string $pattern, null|int $flag) : array<string|int, mixed>
Parameters
$pattern : string

Pattern of the path

$flag : null|int
Return values
array<string|int, mixed>

Paths of the main files found

run()

Build the main file

private run(string $main) : void
Parameters
$main : string

Path of the main file

Return values
void

Search results