ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Builds the require.js configuration. More...
Public Member Functions | |||||||
init () | |||||||
{Initialize the process before its run.
| |||||||
process () | |||||||
{Called when running through the process.
| |||||||
requireJson (array $packages) | |||||||
Creates a require.js configuration from an array of packages. More... | |||||||
aggregateScripts ($package, array $scripts, $file) | |||||||
Concatenate all scripts together into one destination file. More... | |||||||
requireJs (array $json=array()) | |||||||
Constructs the require.js file from the provided require.js JSON array. More... | |||||||
![]() | |||||||
__construct (Composer $composer=null, IOInterface $io=null) | |||||||
{Create a new Process.
| |||||||
process () | |||||||
{Called when running through the process.
| |||||||
getComponentName ($prettyName, array $extra=array()) | |||||||
Retrieves the component name for the component. More... | |||||||
getComponentDir () | |||||||
Retrieves the component directory. More... | |||||||
setComponentDir ($dir) | |||||||
Sets the component directory. More... | |||||||
getVendorDir (array $package) | |||||||
Retrieves the given package's vendor directory, where it's installed. More... | |||||||
Protected Member Functions | |
arrayMergeRecursiveDistinct (array &$array1, array &$array2) | |
Merges two arrays without changing string array keys. More... | |
Protected Attributes | |
$baseUrl = 'components' | |
The base URL for the require.js configuration. More... | |
![]() | |
$composer | |
$io | |
$config | |
$packages = array() | |
$componentDir = 'components' | |
$fs | |
$installationManager | |
Builds the require.js configuration.
Definition at line 23 of file RequireJsProcess.php.
ComponentInstaller\Process\RequireJsProcess::aggregateScripts | ( | $package, | |
array | $scripts, | ||
$file | |||
) |
Concatenate all scripts together into one destination file.
array | $package | |
array | $scripts | |
string | $file |
Definition at line 158 of file RequireJsProcess.php.
References $js, $path, and ComponentInstaller\Process\Process\getVendorDir().
Referenced by ComponentInstaller\Process\RequireJsProcess\requireJson().
|
protected |
Merges two arrays without changing string array keys.
Appends to array if keys are numeric.
array | $array1 | |
array | $array2 |
Definition at line 223 of file RequireJsProcess.php.
Referenced by ComponentInstaller\Process\RequireJsProcess\requireJson().
ComponentInstaller\Process\RequireJsProcess::init | ( | ) |
{Initialize the process before its run.
Implements ComponentInstaller\Process\ProcessInterface.
Definition at line 33 of file RequireJsProcess.php.
References $output.
ComponentInstaller\Process\RequireJsProcess::process | ( | ) |
{Called when running through the process.
Implements ComponentInstaller\Process\ProcessInterface.
Definition at line 46 of file RequireJsProcess.php.
References ComponentInstaller\Process\RequireJsProcess\requireJs(), and ComponentInstaller\Process\RequireJsProcess\requireJson().
Constructs the require.js file from the provided require.js JSON array.
$json | The require.js JSON configuration. |
Definition at line 192 of file RequireJsProcess.php.
Referenced by ComponentInstaller\Process\RequireJsProcess\process().
ComponentInstaller\Process\RequireJsProcess::requireJson | ( | array | $packages | ) |
Creates a require.js configuration from an array of packages.
$packages | An array of packages from the composer.lock file. |
Definition at line 91 of file RequireJsProcess.php.
References ComponentInstaller\Process\RequireJsProcess\$baseUrl, ComponentInstaller\Process\Process\$config, $options, $result, ComponentInstaller\Process\RequireJsProcess\aggregateScripts(), array, ComponentInstaller\Process\RequireJsProcess\arrayMergeRecursiveDistinct(), and ComponentInstaller\Process\Process\getComponentName().
Referenced by ComponentInstaller\Process\RequireJsProcess\process().
|
protected |
The base URL for the require.js configuration.
Definition at line 28 of file RequireJsProcess.php.
Referenced by ComponentInstaller\Process\RequireJsProcess\requireJson().