Ejemplo n.º 1
0
 public function run(array $arguments)
 {
     $flags = "";
     if ($arguments) {
         foreach ($arguments as $dep) {
             if ($this->deps->hasPackage($dep)) {
                 $flags .= $this->cflags($this->deps->getPackage($dep));
             }
         }
     } else {
         $json = $this->deps->nearestJson();
         $package = new Package(dirname($json));
         $dependencies = $package->getDependencies();
         foreach ($dependencies as $dep) {
             if ($this->deps->hasPackage($dep)) {
                 $flags .= $this->cflags($this->deps->getPackage($dep));
             }
         }
     }
     Terminal::write($flags . "\n");
 }
Ejemplo n.º 2
0
Archivo: Deps.php Proyecto: Rhoban/deps
 public function help()
 {
     Terminal::info("deps v0.1, dependencies manager\n");
     Terminal::info("\n");
     foreach ($this->commands as $command) {
         Terminal::bold($command->getName());
         Terminal::info(": usage: deps " . $command->getUsage() . "\n");
         Terminal::write('    ' . implode("\n    ", $command->getDescription()) . "\n\n");
     }
 }