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.