Open joachim-n opened 1 week ago
three additions to the two mentioned entires. i just manually tested and removed the .gitignore file from the justafish addon and renamed the example gitignore file to .gitignore.
from the example.gitignore /vendor/
has to be changed to /vendor
otherwise the vendor folder is shown on git status
sites/sites.php
and /.gitignore
has to be added as well.
the following added to the composerscripts.php
would work and fix the problem. but not sure if it is the cleanest and most elegant approach in php:
copy('./repos/drupal/example.gitignore', './repos/drupal/.gitignore');
$content = file_get_contents('./repos/drupal/.gitignore');
$content = str_replace('/vendor/', '/vendor', $content);
$content .= "\nsites/sites.php";
$content .= "\n/.gitignore";
file_put_contents('./repos/drupal/.gitignore', $content);
The core git clone doesn't have its own .gitignore at the root, it just ships with an example.gitignore.
So we should copy this during the Composer install process, and add to it.
Those are: