From 74942299434254b65afec96548bb3fca191a3605 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 2 Jul 2024 20:32:37 +1000 Subject: [PATCH] [#678] Updated `.gitignore` configs. --- .editorconfig | 17 +++++++++++++++++ .gitignore | 26 ++++++++++++++++---------- composer.json | 5 +++++ 3 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..686c443cec --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# Drupal editor configuration normalization +# @see http://editorconfig.org/ + +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = LF +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[composer.{json,lock}] +indent_size = 4 diff --git a/.gitignore b/.gitignore index 12ad63d871..4669354007 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -# Ignore directories generated by Composer +# To ignore OS temporary files use global .gitignore +# https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer + +# Ignore directories generated by Composer. /drush/contrib/ /vendor/ /web/core/ @@ -7,19 +10,22 @@ /web/profiles/contrib/ /web/libraries/ -# Ignore sensitive information +# Ignore sensitive information. /web/sites/*/settings.php -/web/sites/*/settings.local.php -# Ignore Drupal's file directory +# Ignore Drupal's file directory. /web/sites/*/files/ -# Ignore SimpleTest multi-site environment +# Ignore SimpleTest multi-site environment. /web/sites/simpletest -# Ignore files generated by common IDEs -/.idea/ -/.vscode/ - -# Ignore .env files as they are personal +# Ignore .env files as they could contain sensitive information. /.env + +# Manage .gitattributes with Drupal scaffold for cross-platform compatibility. +# Remove the line below and commit the file for more granular control. +/.gitattributes + +# Manage all .gitignore files with Drupal scaffold. +# Remove the line below and commit the files for more granular control. +**/.gitignore diff --git a/composer.json b/composer.json index 15b7c363f2..784988875e 100644 --- a/composer.json +++ b/composer.json @@ -63,6 +63,11 @@ "extra": { "composer-exit-on-patch-failure": true, "drupal-scaffold": { + "file-mapping": { + "[project-root]/.gitignore": false, + "[web-root]/INSTALL.txt": false, + "[web-root]/README.txt": false + }, "locations": { "web-root": "web/" }