Пример #1
0
 protected function fire()
 {
     $package = Package::fromFolder($this->input->getArgument('path'));
     $this->config->addPackage($package);
     $this->output->note('Package loaded successfully.');
     $this->output->note('Dumping autoloads...');
     Shell::run('composer dump-autoload');
     $this->output->success('Autoloads successfully generated.');
 }
Пример #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $package = Package::fromFolder($input->getArgument('path'));
     $this->config->addPackage($package);
     $output->writeln("<info>Package loaded successfully.</info>");
     $output->writeln("<comment>Dumping autoloads...</comment>");
     Shell::run('composer dump-autoload');
     $output->writeln("<info>Autoloads successfully generated.</info>");
 }
Пример #3
0
 protected function fire()
 {
     $this->partInput = new ConsoleInput($this->output);
     $creator = $this->makeCreator($this->input);
     $package = $creator->create();
     $this->config->addPackage($package);
     $path = $package->getPath();
     $this->output->success("Package directory {$path} created.");
     $this->output->note('Running composer install for new package...');
     Shell::run('composer install --prefer-dist', $package->getPath());
     $this->output->success('Package successfully created.');
 }
Пример #4
0
 public function update(Event $event)
 {
     $path = $event->getComposer()->getPackage()->getTargetDir();
     $studioFile = "{$path}studio.json";
     $config = $this->getConfig($studioFile);
     if ($config->hasPackages()) {
         $packages = $config->getPackages();
         foreach ($packages as $directory) {
             $this->io->write("[Studio] Updating subproject {$directory}...");
             Shell::run('composer update', $directory);
             $this->io->write('done');
         }
     }
 }
Пример #5
0
 protected function fire()
 {
     $this->partInput = new ConsoleInput($this->io);
     $creator = $this->makeCreator($this->input);
     $package = $creator->create();
     $path = $package->getPath();
     $this->io->success("Package directory {$path} created.");
     $this->io->note('Running composer install for new package...');
     Shell::run('composer install --prefer-dist', $package->getPath());
     $this->io->success('Package successfully created.');
     if ($this->shouldLoadNewPackage()) {
         $this->getApplication()->find('load')->run(new ArrayInput(['path' => $path]), $this->output);
     }
 }
Пример #6
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->partInput = new ConsoleInput($this->getHelper('dialog'), $output);
     $creator = $this->makeCreator($input);
     $package = $creator->create();
     $this->config->addPackage($package);
     $path = $package->getPath();
     $output->writeln("<info>Package directory {$path} created.</info>");
     $output->writeln("<comment>Running composer install for new package...</comment>");
     Shell::run('composer install --prefer-dist', $package->getPath());
     $output->writeln("<info>Package successfully created.</info>");
     $output->writeln("<comment>Dumping autoloads...</comment>");
     Shell::run('composer dump-autoload');
     $output->writeln("<info>Autoloads successfully generated.</info>");
 }
Пример #7
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $path = $input->getArgument('path');
     if ($this->abortDeletion($path, $output)) {
         $output->writeln("<comment>Aborted.</comment>");
         return;
     }
     $package = Package::fromFolder($path);
     $this->config->removePackage($package);
     $output->writeln("<comment>Removing package...</comment>");
     $filesystem = new Filesystem(new Local(getcwd()));
     $filesystem->deleteDir($path);
     $output->writeln("<info>Package successfully removed.</info>");
     $output->writeln("<comment>Dumping autoloads...</comment>");
     Shell::run('composer dump-autoload');
     $output->writeln("<info>Autoloads successfully generated.</info>");
 }
Пример #8
0
 /**
  * @return void
  */
 protected function refreshAutoloads()
 {
     if (file_exists(getcwd() . '/composer.json')) {
         $this->output->note('Dumping autoloads...');
         Shell::run('composer dump-autoload');
         $this->output->success('Autoloads successfully generated.');
     }
 }
Пример #9
0
 /**
  * @param OutputInterface $output
  * @param Package $package
  * @return void
  */
 protected function refreshAutoloads(OutputInterface $output, Package $package)
 {
     if (file_exists(getcwd() . '/' . $package->getPath() . '/composer.json')) {
         $output->writeln("<comment>Dumping autoloads...</comment>");
         Shell::run('composer dump-autoload', $package->getPath());
         $output->writeln("<info>Autoloads successfully generated.</info>");
     }
 }
Пример #10
0
 protected function cloneRepository()
 {
     Shell::run("git submodule add {$this->repo} {$this->path}");
     Shell::run("git submodule init");
 }
Пример #11
0
 protected function cloneRepository()
 {
     Shell::run("git clone {$this->repo} {$this->path}");
 }