Add needed libraries to composer.json to support composer workflow

Created on 12 January 2023, almost 2 years ago
Updated 6 September 2024, 3 months ago

Problem/Motivation

it would be nice to be able to automatically install the modules via fullcalendar_views/composer.json to support composer workflows

I would like to see it work with the composer plugin option as a site builder.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

โœจ Feature request
Status

Closed: outdated

Version

5.1

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States SocialNicheGuru

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Charchil Khandelwal โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Closed: outdated over 1 year ago
  • Status changed to Active over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk

    Reopening this, as this would be a preferred option. There are valid cases where dependency management should be done on the composer level.
    I will try to get this solved...

  • @euk opened merge request.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk

    In my merge request above:
    - added composer.libraries.json which can be used by composer to install all external libraries,
    - updates fullcalendar_view.libraries.yml to match versions and install locations of all required files,
    - added Library Manager service: CDN paths processing, libraries definitions, requirements status etc.

    Project using composer can add the following to their composer.json in order to get the libraries installed:

      // Require section:
      "require": {
        "wikimedia/composer-merge-plugin": "^2.1"
      }
      
      // Extra settings:
      "extra": {
        "merge-plugin": {
          "include": [
            "./docroot/modules/contrib/fullcalendar_view/composer.libraries.json"
          ]
        }
      }
    
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mingsong ๐Ÿ‡ฆ๐Ÿ‡บ

    The approach requires works on the composer.json file in the root folder of the Drupal installation, which is out of scope of a contribute module.

    For those websites in which the site owner does not have the access or knowledge to manage composer.json file in the root folder, this module will stop working for them. For this reason, I won't consider this approach. The idea is to make sure this module working for all existing sites. The convenience comes after that.

  • Status changed to Closed: won't fix over 1 year ago
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mingsong ๐Ÿ‡ฆ๐Ÿ‡บ
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk

    I tested both composer and CDN locally and it works.

    The approach requires works on the composer.json file in the root folder of the Drupal installation, which is out of scope of a contribute module.

    This will only help devs to manage dependencies.

    For those websites in which the site owner does not have the access or knowledge to manage composer.json file in the root folder, this module will stop working for them.

    The proposed changes support CDN as well. Why not just give it a chance?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk
  • Status changed to Active over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk
  • Status changed to Closed: outdated over 1 year ago
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mingsong ๐Ÿ‡ฆ๐Ÿ‡บ

    The change is big, which requires a lots of testing and review.

    This module has been put into maintain mode, which means won't consider any new feature.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk

    To be honest, the change is not so big. Do you need a co-maintainer? I can help. Actually was trying to help here.
    Anyway... Thanks for maintaining the module. I will have to use the patch for simplicity.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States euk

    Re-rolled the patch for v5.1.23. Still works fine and would be a good feature.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Sharique

    I've updated patch to apply on 5.2.2.
    I had to remove the call to libraries alter, as it still loading from CDN even when I've in local, so that needs to be checked again.

Production build 0.71.5 2024