AssetInstall

abstract class System\Console\Asset\AssetInstall
extends Winter\Storm\Console\Command
implements 
    Symfony\Component\Console\Command\SignalableCommandInterface

Extends

Class Description
Command

Command base class Contains utilities to make developing CLI commands nicer

Traits

Trait Description
HandlesCleanup

Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class.

ProvidesAutocompletion

Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class.

Properties

protected $assetType : string

Type of asset to be installed, @see PackageManager

protected $configFile : string

The asset config file

protected $npmCommand : string

The NPM command to run.

protected $npmPath : string

The path to the "npm" executable.

protected $requiredPackages : array

The required packages for this compiler

protected $terms : array

Terms used in messages.

inherited protected $laravel : Winter\Storm\Foundation\Application

Inherited from Command

inherited protected $replaces : array

Inherited from Command

List of commands that this command replaces (aliases)

Methods

public handle () : integer

Execute the console command.

Returns
integer

protected getNpmVersion () : string

Gets the installed NPM version.

Returns
string

protected getRequestedAndRegisteredPackages () : array

Returns
array

protected installPackageDeps () : integer

Installs the dependencies for the given package.

Returns
integer

protected processPackages (array $registeredPackages, System\Classes\Asset\PackageJson $packageJson) : System\Classes\Asset\PackageJson

Parameters
Property Description
$registeredPackages
array
$packageJson
System\Classes\Asset\PackageJson
Returns
System\Classes\Asset\PackageJson

protected validateRequirePackagesPresent (System\Classes\Asset\PackageJson $packageJson) : System\Classes\Asset\PackageJson

Parameters
Property Description
$packageJson
System\Classes\Asset\PackageJson
Returns
System\Classes\Asset\PackageJson

inherited public __construct ()

Inherited from Command

Create a new command instance.

Returns
mixed

inherited public alert (string $string, int | string | null $verbosity = null) : void

Inherited from Command

Write a string in an alert box.

Parameters
Property Description
$string
string
$verbosity
int | string | null
Returns
void

inherited public complete (Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions) : void

Provide autocompletion for this command's input

Parameters
Property Description
$input
Symfony\Component\Console\Completion\CompletionInput
$suggestions
Symfony\Component\Console\Completion\CompletionSuggestions
Returns
void

inherited public error (string $string, int | string | null $verbosity = null) : void

Inherited from Command

Write a string as error output.

Parameters
Property Description
$string
string
$verbosity
int | string | null
Returns
void

inherited public getSubscribedSignals () : array

Inherited from HandlesCleanup

Returns the process signals this command listens to

Returns
array

inherited public handleSignal (integer $signal) : void

Inherited from HandlesCleanup

Handle the provided Unix process signal

Parameters
Property Description
$signal
integer
Returns
void

inherited public handleWindowsSignal (integer $event) : void

Inherited from HandlesCleanup

Handle the provided Windows process singal.

Parameters
Property Description
$event
integer
Returns
void

Extended by

Copyright © 2024 Winter CMS