MixInstall
class System\Console\MixInstall
extends Winter\Storm\Console\Command
implements
Symfony\Component\Console\Command\SignalableCommandInterface
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
$defaultMixVersion
:
string
= "^6.0.41"
Default version of Laravel Mix to install
protected
static
$defaultName
:
string
|
null
= "mix:install"
The default command name for lazy loading.
protected
$description
:
string
= "Install Node.js dependencies required for mixed assets"
The console command description.
protected
$npmCommand
:
string
= "install"
The NPM command to run.
protected
$npmPath
:
string
= "npm"
The path to the "npm" executable.
protected
$signature
:
string
= "mix:install\n {npmArgs?* : Arguments to pass through to the \"npm\" binary}\n {--npm= : Defines a custom path to the \"npm\" binary}\n {--p|package=* : Defines one or more packages to install}"
The name and signature of this command.
protected
$terms
:
mixed
= {"complete":"install","completed":"installed"}
protected
$replaces
:
array
= []
List of commands that this command replaces (aliases)
Methods
public handle () : integer
Execute the console command.
protected getNpmVersion () : string
Gets the install NPM version.
protected installPackageDeps () : int
Installs the dependencies for the given package.
protected writePackageJson (string $path, array $data) : void
Write to the package.json file
Property | Type | Description |
---|---|---|
$path | string |
string
|
$data | array |
array
|
public __construct ()
Create a new command instance.
public
alert (string $string, int | string | null $verbosity = null
)
: void
Write a string in an alert box.
Property | Type | Description |
---|---|---|
$string | string |
string
|
$verbosity | int | string | null |
int | string | null
|
public complete (Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions) : void
Provide autocompletion for this command's input
Property | Type | Description |
---|---|---|
$input | Symfony\Component\Console\Completion\CompletionInput |
Symfony\Component\Console\Completion\CompletionInput
|
$suggestions | Symfony\Component\Console\Completion\CompletionSuggestions |
Symfony\Component\Console\Completion\CompletionSuggestions
|
public
error (string $string, int | string | null $verbosity = null
)
: void
Write a string as error output.
Property | Type | Description |
---|---|---|
$string | string |
string
|
$verbosity | int | string | null |
int | string | null
|
public getSubscribedSignals () : array
Returns the process signals this command listens to
public handleSignal (integer $signal) : integer | false
Handle the provided Unix process signal
Property | Type | Description |
---|---|---|
$signal | integer |
integer
|
public handleWindowsSignal (integer $event) : void
Handle the provided Windows process singal.
Property | Type | Description |
---|---|---|
$event | integer |
integer
|