MixCompile
class System\Console\MixCompile
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
static
$defaultName
:
string
|
null
= "mix:compile"
The default command name for lazy loading.
protected
$description
:
string
= "Mix and compile assets"
The console command description.
protected $packageJson : array
Local cache of the package.json file contents
protected
$signature
:
string
= "mix:compile\n {webpackArgs?* : Arguments to pass through to the Webpack CLI}\n {--f|production : Runs compilation in \"production\" mode}\n {--s|silent : Silent mode}\n {--e|stop-on-error : Exit once an error is encountered}\n {--m|manifest= : Defines package.json to use for compile}\n {--p|package=* : Defines one or more packages to compile}"
The name and signature of this command.
protected
$replaces
:
array
= []
List of commands that this command replaces (aliases)
Methods
public handle () : integer
Execute the console command.
protected canCompilePackage (string $mixJsPath) : bool
Check if Mix is able to compile the provided winter.mix.js file
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
protected createCommand (string $mixJsPath) : array
Create the command array to create a Process object with
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
protected createWebpackConfig (string $mixJsPath) : void
Create the temporary mix.webpack.js config file to run webpack with
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
protected getPackagePath (string $mixJsPath) : string
Get the package path for the provided winter.mix.js file
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
protected getWebpackJsPath (string $mixJsPath) : string
Get the path to the mix.webpack.js file for the provided winter.mix.js file
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
protected mixPackage (string $mixJsPath) : integer
Run the mix command against the provided package
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
protected readNpmPackageManifest () : array
Read the package.json file for the project, path configurable with the
--manifest
option
protected removeWebpackConfig (string $mixJsPath) : void
Remove the temporary mix.webpack.js file
Property | Type | Description |
---|---|---|
$mixJsPath | string |
string
|
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
|