예제 #1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function run()
 {
     $collections = Basset::getCollections();
     foreach ($collections as $collection) {
         echo $collection->getName() . ":\n";
         $assets = $collection->getAssets();
         echo '   Styles:  ' . (isset($assets['style']) ? $collection->isCompiled('style') ? 'Compiled' : 'Uncompiled or needs re-compiling' : 'None available');
         echo "\n";
         echo '   Scripts: ' . (isset($assets['script']) ? $collection->isCompiled('script') ? 'Compiled' : 'Uncompiled or needs re-compiling' : 'None available');
         echo "\n";
     }
     echo "\nTotal collections: " . count($collections);
 }
예제 #2
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function run($arguments)
 {
     if (!empty($arguments)) {
         $collection = $arguments[0];
         if (!Basset::hasCollection($collection)) {
             echo "Oops! Could not find collection: {$collection}";
             return;
         }
         echo "Gathering assets for collection...\n";
         $collections = array(Basset::collection($collection));
     } else {
         echo "Gathering collections to compile...\n";
         $collections = Basset::getCollections();
     }
     // Spin through and compile each of the collections.
     foreach ($collections as $collection) {
         $this->compile($collection);
     }
     echo "\nDone!";
 }