- ๐ฎ๐นItaly finex
Hi, thanks for the patch. Unfortunately the module settings page does not work on D10 (after manually applying the compatibility patch).
I don't see any docs on installing sparkline library for this module, so I'm using these drupal.org docs โ .
That installs the library to web/libraries/jquery-sparkline rather than web/libraries/sparkline as the module expects.
So, I'm going to throw a patch here which adjusts for the library path.
An alternate solution which I'm happy to contribute to is that we document the correct procedure to install the sparkline dependency - let me know!
Steps (based on linked docs) below. This can probably be improved on to add a composer.json for this project so it automatically does the final step.
The recipe for setting up Asset Packagist for use in your projects is as follows:
Add the Composer Installers Extender PHP package by oomphinc to your project's root composer.json file, by running the following command:
composer require oomphinc/composer-installers-extender
Add Asset Packagist to the "repositories" section of your project's root composer.json.
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
Ensure that NPM and Bower assets are registered as new "installer-types" and, in addition to type:drupal-library, they are registered in "installer-paths" to be installed into Drupal's /libraries folder, within the "extra" section of your project's root composer.json file.
"extra": {
"installer-types": [
"npm-asset",
"bower-asset"
],
"installer-paths": {
"web/libraries/{$name}": [
"type:drupal-library",
"type:npm-asset",
"type:bower-asset"
]
}
}
The installation path of a specific library can be controlled by adding it to the "installer-paths" configuration above the general configuration. For example, the chosen module expects the library at /libraries/chosen, but composer require npm-asset/chosen-js
installs the library into /libraries/chosen-js; the following override installs it into the expected folder:
"extra": {
"installer-paths": {
"web/libraries/chosen": ["npm-asset/chosen-js"],
"web/libraries/{$name}": [
"type:drupal-library",
"type:npm-asset",
"type:bower-asset"
]
}
}
You may now require libraries from NPM or Bower via Composer on the command line:
composer require npm-asset/jquery-sparkline
Contrib and custom modules may include these dependencies in their own respective composer.json files. See Requiring third-party libraries with Composer โ for additional instructions.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Hi, thanks for the patch. Unfortunately the module settings page does not work on D10 (after manually applying the compatibility patch).