πŸ‡ΊπŸ‡ΈUnited States @ramez.gaberiel

Account created on 15 March 2011, over 13 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States ramez.gaberiel

This is somewhat related but not entirely the same issue, the radix:create instruction only works assuming the user is using drupal/recommended-project, and hard codes the 'web' directory inside the drush commands.

Would there be any opposition to making it more universal and remove the hardcoded 'web' directory from the drush commands and do something like this instead? Or is there a specific reason the generate starterkit instruction should only work with drupal/recommended project installations?

<?php
use Drush\Drush;
.
.
.
    public function createSubTheme(string $name)
    {
      $drupal_root = Drush::bootstrapManager()->getRoot();
      try {
          $this->copyStarterKit($drupal_root);
          $this->generateTheme($name, $drupal_root);
          $this->removeCopiedStarterKit($drupal_root);
.
.
.
    private function copyStarterKit(string $drupal_root)
    {
        $filesystem = new Filesystem();
        $source = "$drupal_root/themes/contrib/radix/src/kits/radix_starterkit";
        $destination = "$drupal_root/themes/custom/radix_starterkit";
        $filesystem->mirror($source, $destination);
    }
.
.
.
?>
Production build 0.71.5 2024