diff --git a/app/Console/Commands/Bundle/Render.php b/app/Console/Commands/Bundle/Render.php index 0f9215a..fc609a0 100644 --- a/app/Console/Commands/Bundle/Render.php +++ b/app/Console/Commands/Bundle/Render.php @@ -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, '.')) {