Add composer.json to manage dependencies

Created on 30 March 2021, over 3 years ago
Updated 18 July 2024, 4 months ago

Problem/Motivation

The manual inclusion and renaming of the ez-plus package within the 'libraries' directory is inconvenient for projects that manage dependencies via composer and ignore the 'libraries' directory in their git flow.

It would be preferred if the project included a composer.json that references `npm-asset/es-plus` as a dependency so that composer based projects can correctly get the package in `libraries`. Note, it is an implied assumption that most drupal projects managed by composer would be instructing npm-assets and bower-assets to install to `libraries`. Any deviation in this install path would cause an expected break due to the deviation from the module's library definition. And that responsibility to reconcile paths (if it ever happens) should fall on the individual projects.

Projects that don't leverage composer can't do business as usual without renaming the directory.

Steps to reproduce

To include the package via composer a project must call `composer require npm-asset/ez-plus`. Following drupal instructions regarding install paths ( https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins... β†’ ) would result in the ez-plus directory that we are asked to rename.

Proposed resolution

1. Temporary patch for our composer users so that the library can point to the correctly named package directory 'ez-plus'.
2. Maintainer to establish composer.json file that includes npm-asset/ez-plus as dependency.
3. Update readme to instruct not to change directory name when manually adding the package to libraries.
4. Update library definition within .libraries.yml to point to new directory.

Remaining tasks

1. Create temp patch.
2. Create long term management via composer.json, revise

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024