From 2aef510fb2dc77e413bacfa28312ecbfc58c0ef2 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 8 Aug 2023 15:48:01 -0400 Subject: [PATCH] fix(chosen): use installer-plugin to place chosenJS In order for chosen to work in Drupal, it must reside in ./web/libraries/chosen. This allows composer to utilize the installer-paths to accomplish this. Co-authoried-by: @vinmassaro --- composer.json | 8 +++++++- web/profiles/custom/yalesites_profile/composer.json | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b73f9cbd8f..9596e909a0 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "drupal/core-composer-scaffold": "^9.2", "drupal/core-recommended": "^9.2", "drush/drush": "^11 || ^12", + "oomphinc/composer-installers-extender": "^2.0", "pantheon-systems/drupal-integrations": "^9", "yalesites-org/yalesites_profile": "*" }, @@ -57,6 +58,7 @@ "[project-root]/.gitattributes": false } }, + "installer-types": ["npm-asset"], "installer-paths": { "web/core": [ "type:drupal-core" @@ -87,6 +89,9 @@ ], "web/private/scripts/quicksilver/{$name}/": [ "type:quicksilver-script" + ], + "web/libraries/chosen": [ + "jjj/chosen" ] }, "enable-patching": true, @@ -106,7 +111,8 @@ "composer/installers": true, "cweagans/composer-patches": true, "drupal/core-composer-scaffold": true, - "drupal/console-extend-plugin": true + "drupal/console-extend-plugin": true, + "oomphinc/composer-installers-extender": true } }, "scripts": { diff --git a/web/profiles/custom/yalesites_profile/composer.json b/web/profiles/custom/yalesites_profile/composer.json index a2e583b759..9d1018c94e 100644 --- a/web/profiles/custom/yalesites_profile/composer.json +++ b/web/profiles/custom/yalesites_profile/composer.json @@ -81,6 +81,7 @@ "drupal/upgrade_status": "^3.18", "drupal/webform": "^6.2@beta", "drupal/wingsuit_companion": "^2.0@RC", + "jjj/chosen": "^2.2", "yalesites-org/atomic": "1.17.0", "yalesites-org/yale_cas": "^1.0" },