Allows to skip building assets
This commit is contained in:
parent
0f6d7168b4
commit
9aca3bc890
|
@ -17,7 +17,7 @@ class Render extends Command
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'bundle:render { --i|ignore-cache : Ignore cache }';
|
||||
protected $signature = 'bundle:render { --a|assets : Rebuild assets }';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
|
@ -31,9 +31,13 @@ class Render extends Command
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->output->write('Building assets... ');
|
||||
Process::run('npm run build')->throw();
|
||||
$this->info('OK');
|
||||
if ($this->options('assets')) {
|
||||
$this->output->write('Building assets... ');
|
||||
Process::run('npm run build')->throw();
|
||||
$this->info('OK');
|
||||
|
||||
$this->call('cache:clear');
|
||||
}
|
||||
|
||||
$path = '/';
|
||||
$bundles = Bundle::findBundles(Storage::disk(env('CONTENT_DISK')), $path, true);
|
||||
|
@ -41,7 +45,7 @@ public function handle()
|
|||
$progress->start();
|
||||
|
||||
foreach ($bundles as $bundle) {
|
||||
$result = $bundle->render($this->option('ignore-cache'));
|
||||
$result = $bundle->render();
|
||||
|
||||
foreach ($result as $path => $content) {
|
||||
if (!Str::contains($path, '.')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user