public function create(Package $package)
 {
     $this->packagePath = getcwd() . '/' . $this->packageParser->parse($package->getPackageName())->toDirectoryName();
     if ($this->filesystem->exists($this->packagePath)) {
         throw new DirectoryExistsException($this->packagePath);
     }
     $this->setup();
     foreach ($this->generators as $generator) {
         $this->buildDirectories($generator->getDirectories());
         $generator->create($this->packagePath);
     }
 }
Beispiel #2
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     // Data
     $this->packageName = $this->askForArgument('package', 'What is your package name?');
     $this->packageDescription = $this->askForArgument('description', 'What is your package description?');
     $this->licenceName = $this->chooseAnOption('Choose a licence', LicenceGenerator::showList());
     $this->package->setPackageName($this->packageName);
     $this->manager->fire('package.new', $this->package);
     // Base
     //        $this->package->setPackageName($this->packageName);
     //        $this->parser = new PackageParser($this->packageName);
     //        $generator = new PackageGenerator();
     // Composer
     //        $composer = $this->prepareComposer();
     //        $generator->addGenerator($composer);
     // Licence
     //        $licence = $this->prepareLicence();
     //        $generator->addGenerator($licence);
     // Readme
     //        $readme = $this->prepareReadme();
     //        $generator->addGenerator($readme);
     // Create the Package
     //        $generator->create($this->package);
 }
 public function handle(Package $package)
 {
     var_dump('new package.....');
     var_dump($package->getPackageName());
     die;
 }