Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
35
vendor/chi-teck/drupal-code-generator/bin/dcg
vendored
Executable file
35
vendor/chi-teck/drupal-code-generator/bin/dcg
vendored
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use DrupalCodeGenerator\ApplicationFactory;
|
||||
use DrupalCodeGenerator\Command\Navigation;
|
||||
use DrupalCodeGenerator\GeneratorDiscovery;
|
||||
use DrupalCodeGenerator\Utils;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
// The autoloader may have a different location if DCG is installed as a local
|
||||
// Composer package.
|
||||
$autoloader = file_exists(__DIR__ . '/../vendor/autoload.php')
|
||||
? require __DIR__ . '/../vendor/autoload.php'
|
||||
: require __DIR__ . '/../../../autoload.php';
|
||||
|
||||
// Create an application.
|
||||
$application = ApplicationFactory::create();
|
||||
|
||||
// Discover generators.
|
||||
$discovery = new GeneratorDiscovery(new Filesystem());
|
||||
$commands_directories[] = ApplicationFactory::getRoot() . '/src/Command';
|
||||
$home = Utils::getHomeDirectory();
|
||||
if (file_exists($home . '/.dcg/Command')) {
|
||||
$commands_directories[] = $home . '/.dcg/Command';
|
||||
$autoloader->addPsr4('DrupalCodeGenerator\\', $home . '/.dcg');
|
||||
}
|
||||
$generators = $discovery->getGenerators($commands_directories);
|
||||
$application->addCommands($generators);
|
||||
|
||||
// Add the navigation command.
|
||||
$application->add(new Navigation($generators));
|
||||
$application->setDefaultCommand('navigation');
|
||||
|
||||
// Run.
|
||||
$application->run();
|
Reference in a new issue