Improve composer support

Created on 16 May 2023, about 1 year ago
Updated 17 May 2023, about 1 year ago

Problem/Motivation

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

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

Steps to reproduce

composer require 'drupal/blazy:^2.15'

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",
  }, 
  "extra": {
    "installer-types": [
      "bower-asset",
      "npm-asset"
    ],
    "installer-paths": {
      "libraries/{$name}": [
        "type:drupal-library",
        "type:bower-asset",
        "type:npm-asset"
      ]
    },
    "drupal-libraries": {
      "libraries": [
          {"name": "blazy", "package": "npm-asset/blazy"},
      ]
    },

Remaining tasks

Sister issue for Slick: ✨ Improve composer support Needs work

User interface changes

Simpler installation.

API changes

None

Data model changes

None

✨ Feature request
Status

Closed: outdated

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