Skip to content

Instantly share code, notes, and snippets.

@Radon8472
Created February 25, 2020 10:59
Show Gist options
  • Save Radon8472/e351e8d28ab1257416b672f3b32f8666 to your computer and use it in GitHub Desktop.
Save Radon8472/e351e8d28ab1257416b672f3b32f8666 to your computer and use it in GitHub Desktop.
Composer-Example files
{
"comments": [
"in some situations a '.git' folder is created in target-dir. Specially for custom-modul type e.g. 'pw-module'",
"this is a big problem. Sometimes even the config 'preferred-install' has no effect."
"So this scripts will remove the folders after install/update. It works, but is not the best solution, because"
"custom-package types could be installed somewhere else."
"@see: https://github.com/composer/composer/issues/7058#issuecomment-588162369"
],
"scripts": {
"remove-git-folders": ["echo [WARNING] Delete all .git dirs", "rm -rf site/modules/**/.git", "rm -rf vendor/**/**/.git"],
"post-update-cmd": ["@remove-git-folders"],
"post-install-cmd": ["@remove-git-folders"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment