/** * Tidy up the filesystem with the build cleaner. * * @return void */ protected function tidyUpFilesystem() { $collections = array_keys($this->environment->all()) + array_keys($this->manifest->all()); foreach ($collections as $collection) { if ($this->input->getOption('verbose')) { $this->line('[' . $collection . '] Cleaning up files and manifest entries.'); } $this->cleaner->clean($collection); } $this->input->getOption('verbose') and $this->line(''); $this->info('The filesystem and manifest have been tidied up.'); }
/** * Execute the console command. * * @return void */ public function fire() { $this->input->getOption('force') and $this->builder->setForce(true); $this->input->getOption('gzip') and $this->builder->setGzip(true); if ($production = $this->input->getOption('production')) { $this->comment('Starting production build...'); } else { $this->comment('Starting development build...'); } $collections = $this->gatherCollections(); if ($this->input->getOption('gzip') and !function_exists('gzencode')) { $this->error('[gzip] Build will not use Gzip as the required dependencies are not available.'); $this->line(''); } foreach ($collections as $name => $collection) { if ($production) { $this->buildAsProduction($name, $collection); } else { $this->buildAsDevelopment($name, $collection); } $this->cleaner->clean($name); } }