Skip to content
Snippets Groups Projects
Commit 4b5afc23 authored by João Ventura's avatar João Ventura Committed by Joao Ventura
Browse files

Issue #3329110 by jcnventura: Support composer.libraries.json library installation method

parent 34f40a88
No related branches found
No related tags found
No related merge requests found
.idea
......@@ -46,30 +46,50 @@ INSTALLATION
contributed Drupal module. Visit https://www.drupal.org/node/1897420 for
further information.
* Install external library from xdan trough composer or manual. Library
should be available at yourdrupalsite.com/libraries/datetimepicker
should be available at example.com/libraries/jquery-datetimepicker
1. Manual download.
Download https://github.com/xdan/datetimepicker/archive/2.5.20.zip,
and extract inside drupal root folder: libraries/jquery-datetimepicker
and extract inside [webroot]/libraries/jquery-datetimepicker
2. Using drupal-libraries-installer plugin.
`composer require "zodiacmedia/drupal-libraries-installer":"^1.4.1"`
[Ensure composer packages of type drupal-library are configured to
install to the appropriate path.](https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies#installer-dirs)
```
"extra": {
"drupal-libraries": {
"jquery-datetimepicker": "https://github.com/xdan/datetimepicker/archive/2.5.20.zip"
Add the following lines to your site's root composer.json:
```
"extra": {
"drupal-libraries": {
"jquery-datetimepicker": "https://github.com/xdan/datetimepicker/archive/2.5.20.zip"
},
}
```
3. Using wikimedia/composer-merge-plugin plugin.
`composer require "wikimedia/composer-merge-plugin":"^2.0"`
Add the following lines to your site's root composer.json:
```
"extra": {
"merge-plugin": {
"include": [
"[web-root]/modules/contrib/single_datetime/composer.libraries.json"
]
},
}
```
3. Using oomphinc/composer-installers-extender plugin and [Asset Packagist](https://asset-packagist.org/).
`composer require "oomphinc/composer-installers-extender":"^1.1 || ^2.0"`
`composer require "npm-asset/jquery-datetimepicker":"^2.5"`
[Ensure composer packages of type npm-asset are configured to install
to the appropriate path.](https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies#third-party-libraries)
}
```
4. Using oomphinc/composer-installers-extender plugin and [Asset Packagist](https://asset-packagist.org/).
```
composer require "oomphinc/composer-installers-extender":"^1.1 || ^2.0"
composer require "npm-asset/jquery-datetimepicker":"^2.5"
```
[Ensure composer packages of type drupal-library (options 2 and 3) or
npm-asset (option 4) are configured to install to the appropriate path.
](https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies#third-party-libraries)
CONFIGURATION
-------------
......
{
"name": "drupal/single_datetime",
"type": "drupal-module",
"description": "Date time picker form element using the xdan jQuery Plugin Date and Time Picker library",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/single_datetime",
"minimum-stability": "dev",
"support": {
"issues": "https://www.drupal.org/project/issues/single_datetime",
"source": "https://git.drupalcode.org/project/single_datetime"
},
"require": {
"xdan/datetimepicker": "*"
},
"repositories": {
"jquery-datetimepicker": {
"type": "package",
"package": {
"name": "xdan/datetimepicker",
"version": "2.5.20",
"type": "drupal-library",
"extra": {
"installer-name": "jquery-datetimepicker"
},
"dist": {
"url": "https://github.com/xdan/datetimepicker/archive/2.5.20.zip",
"type": "zip"
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment