Install Javascript Library
This module is installed in the same way as any other module. The installation can be done manually or preferably with composer.
Manual installation
- Place the klaro Drupal module in the
modulesdirectory of your Drupal installation. - Install the
klaro-org/klaro-jsjavascript library in yourlibrariesfolder. - Enable the 'Klaro!' module in 'Extend':
/admin/modules. - Set up user permissions:
/admin/people/permissions#module-klaro(see below) - Customize settings:
/admin//config/user-interface/klaro
Using composer
We recommend to use composer for step 1 and 2 (see above).
To install the module, enter:
composer require drupal/klaro
The package drupal/klaro_js is required by drupal/klaro and will install the javascript library. (You may have to whitelist drupal/klaro_js in your definition of repo.packagist.org in your project's composer.json.)
The original library is klaro-org/klaro-js. The maintainers of drupal/klaro_js keep the package synchronized with the original package.
Install via composer.libraries.json (Legacy)
For installing the klaro js library via composer.libraries.json you need the composer-merge-plugin and add the file to the extra merge-plugin section of your root composer.json:
"extra": {
"merge-plugin": {
"include": [
"web/modules/contrib/klaro/composer.libraries.json"
]
}
}and then require the package:
composer require "klaro-org/klaro-js":"0.7.22"
Include in root composer.json (Legacy)
If you want to keep on track for your Software Bill or Materials, you can add this composer entry to your composer.json:
"repositories": {
[...],
"klaro-org.klaro-js": {
"type": "package",
"package": {
"name": "klaro-org/klaro-js",
"type": "drupal-library",
"version": "0.7.22",
"dist": {
"url": "https://github.com/klaro-org/klaro-js/archive/refs/tags/v0.7.22.zip",
"type": "zip"
}
}
}
}and then require the package:
composer require "klaro-org/klaro-js":"0.7.22"Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion