Closed zoglo closed 6 months ago
I'm not 100% sure this makes sense. Why would you clone that repository? And when using composer create-project contao/contao-demo
, wouldn't the .gitignore
make sense then as well?
I think it can be suboptimal to include developer stuff in a demo project that is clearly designed to be a "starting point" for people not familiar with the project. Regardless of that, shouldn't the .gitignore
file be exactly the same as https://github.com/contao/managed-edition/blob/5.x/.gitignore if we actually add one?
Why would you clone that repository?
If you are working on updates to the demo, such as bug fixes, but it may be a one-time thing for most.
I'm not 100% sure this makes sense. Why would you clone that repository? And when using
composer create-project contao/contao-demo
, wouldn't the.gitignore
make sense then as well?I think it can be suboptimal to include developer stuff in a demo project that is clearly designed to be a "starting point" for people not familiar with the project. Regardless of that, shouldn't the
.gitignore
file be exactly the same as https://github.com/contao/managed-edition/blob/5.x/.gitignore if we actually add one?
You are right on not using the developer files within a demo to help people, but most people install it via composer create-project
, hence the .giattributes
that ignores the .gitignore, so it'll never be within vendor nor in your root anyway.
What I removed in my latest commit is:
parameters.yml
as it's outdated.env
(added it to my .git/info/exclude).git
(added it to my .git/info/exclude)I agree with using the same gitignore as in the Contao project, but it does include lines like:
/files/
- We would actually want them in the demo theme due to the css files/templates
- We want these included in the theme as well!/var/backups/
- We don't want var, but we need the backups folder for the backup:restore
commandWhat we would never want to push would be the following files, that are usually part of my .git/info/exclude but not everyone sets them up:
!/system/config
- Not needed in this demo, I exluded the whole /system/ folder (The system settings don't need to be part and were never pushed)/composer.lock
- Do we want a composer install
to install an outdated version?However, if we let the .gitattributes within this PR, the .gitignore will never appear within vendor nor in the root directory.
Wdyt @aschempp ?
(My initial idea was to add a global gitignore file that would work for most platforms and IDE)
Maybe we should rather add this to the Contributing
section in the readme? Here's what my local .gitignore
looks like for developing the demo:
/assets
/bin
/public
/system
/var/*
!/var/backups
/vendor
/composer.lock
/.gitignore
/.env*
Closing this as I'm using the local variant as well nowadays.
QoL Developer improvements
TL;DR
Description
This PR allows installing Contao within the cloned repository by git-ignoring the usual folders and adding the allowed plugins within composer.json. This allows developers to work within the cloned repository and install the demo within it.
I made sure that the var/backups folder is not excluded, so it allows uploading the backups (
contao:backup:restore
)Edit