Libraries install instructions don't seem to work

Created on 27 February 2024, about 1 year ago
Updated 9 September 2024, 7 months ago

In order to get it to install, I had to place

./mypath/modules/contrib/jsnlog/composer.libraries.json

in the composer json

"merge-plugin": { include: [ "./mypath/modules/contrib/jsnlog/composer.libraries.json" ] }

However, that installs the library at libraries/jsnlog.js

The Drupal module expects the path to be: libraries/jsnlog

So to get that to work I had to install the Drupal module, not the bower-asset or the libraries.json, and in my composer added:

{
"type": "package",
"package": {
"name": "mperdeck/jsnlog.js",
"version": "v2.30.0",
"type": "drupal-library",
"dist": {
"url": "https://github.com/mperdeck/jsnlog.js/archive/refs/tags/v2.30.0.tar.gz",
"type": "tar"
},
"extra": {
"installer-name": "jsnlog"
}
}
}

With installer-name to "jsnlog" for the path to work properly.

This works for now, but if the jsnlog module ever updates the version of jsnlog.js, my composer will break.

So, is it possible for the module to use the correct path(s)? And/or update the install instructions because the readme isn't exactly correct.

πŸ’¬ Support request
Status

Active

Version

1.3

Component

Code

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

Comments & Activities

Production build 0.71.5 2024