Improve composer support

Created on 16 May 2023, about 1 year ago
Updated 7 April 2024, 3 months ago

Problem/Motivation

When installing the module via composer, additional manual steps are required.

Another module, Varbase Media also relies on Slick, but its composer.json is sufficiently sophisticated to automatically carry out the manual steps recomended for this module.

Steps to reproduce

Proposed resolution

Copy relevant sections of composer.json from varbase_media.

I am not a composer expert but i think the relevant sections are:

  "repositories": {
    "drupal": {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    },
    "assets": {
      "type": "composer",
      "url": "https://asset-packagist.org"
    }

and

  "require": {
    "oomphinc/composer-installers-extender": "~2.0",
  }, 
  "suggest": {
    "npm-asset/blazy": "~1.0: Provides JavaScript library necessary for Blazy loading",
    "npm-asset/slick-carousel": "~1.0: Provides JavaScript library necessary for Slick Carousel"
  }, 
  "extra": {
    "installer-types": [
      "bower-asset",
      "npm-asset"
    ],
    "installer-paths": {
      "libraries/slick": ["npm-asset/slick-carousel"],
      "libraries/{$name}": [
        "type:drupal-library",
        "type:bower-asset",
        "type:npm-asset"
      ]
    },
    "drupal-libraries": {
      "libraries": [
          {"name": "blazy", "package": "npm-asset/blazy"},
          {"name": "slick", "package": "npm-asset/slick-carousel"}
      ]
    },

Remaining tasks

Question - Blazy, a dependency of this module suffers from the same issues. Carry out the same fix there? Will multiple copies of the same solution cause any problems?

Sister issue for blazy: Improve composer support Closed: outdated

User interface changes

Simpler installation.

API changes

None

Data model changes

None

Feature request
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom NaheemSays

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024