/** * Clean all built collections and the manifest entries. * * @return void */ public function cleanAll() { $collections = array_keys($this->environment->all()) + array_keys($this->manifest->all()); foreach ($collections as $collection) { $this->clean($collection); } }
/** * 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.'); }
/** * Gather the collections to be built. * * @return array */ protected function gatherCollections() { if (!is_null($collection = $this->input->getArgument('collection'))) { if (!$this->environment->has($collection)) { $this->comment('[' . $collection . '] Collection not found.'); return array(); } $this->comment('Gathering assets for collection...'); $collections = array($collection => $this->environment->collection($collection)); } else { $this->comment('Gathering all collections to build...'); $collections = $this->environment->all(); } $this->line(''); return $collections; }