Skip to content

Commit

Permalink
feat: conditionally add drupal optimizations only on composer 1. Fixes
Browse files Browse the repository at this point in the history
…#37

Also bump up composer-patches plugin to require composer 2 support
  • Loading branch information
hussainweb committed Oct 11, 2020
1 parent 579b80d commit 9ae0973
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions axltempl/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def get_drupal_template(name, description, core, core_version, docroot, cache_se
if cache_service == "memcache":
composer["require"]["drupal/memcache"] = "^2.0"
composer["require"]["drupal/core-composer-scaffold"] = core_version

if not is_version_2():
composer["require"]["zaporylie/composer-drupal-optimizations"] = "^1.1"

return composer


Expand Down
5 changes: 2 additions & 3 deletions axltempl/files/drupal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
"require": {
"php": ">=7.2",
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6.5",
"cweagans/composer-patches": "^1.7.0",
"drush/drush": "^9.7.1 | ^10.0",
"vlucas/phpdotenv": "^5.0",
"zaporylie/composer-drupal-optimizations": "^1.1"
"vlucas/phpdotenv": "^5.0"
},
"require-dev": {
"axelerant/db-docker": "^1.0",
Expand Down

0 comments on commit 9ae0973

Please sign in to comment.