Closed (fixed)
Project:
Colorbox
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2016 at 17:24 UTC
Updated:
30 Sep 2017 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
replicaobscuraComment #3
rossb89 commentedAdd something like this to your repositories section in composer.json and it works fine.
e.g.
Comment #4
webcultist commentedBut it's true that it's not possible to load it that way out of the box. Better remote the dependency and document it on the page.
Comment #5
heddnRight now the latest version of colorbox I can pull down with composer is 1.1, before the requirements for the js library was added to it. Things just fail.
http://cgit.drupalcode.org/colorbox/tree/composer.json?h=8.x-1.2-- (no no longer functional)
http://cgit.drupalcode.org/colorbox/tree/composer.json?h=8.x-1.1++ (works)
Comment #6
heddnComment #7
heddn#2714631: Consider composer library support I think is what broke things? I've been involved in a few of these composer.json issues across contrib now. There isn't a good way to test the composer json until it is committed.
If we want to provide guidance on how to use composer to download the required js dependency, see how that was done on https://www.drupal.org/project/file_browser. There's an example gist added to the project page that walks things through.
Comment #8
MaskOta commentedSo in order for composer to be able to find the dependant library it needs to be available on https://packagist.org/search/?q=jackmoore ?
Comment #9
heddnre #8: correct. Also to note, the path that bower wants to put the files is not at 'colorbox', but rather 'jquery-colorbox'. So if this does get loaded on packagist, it will probably get loaded in similar manner. Perhaps this should be considered an a BC layer added to check in both locations.
Comment #11
frjo commentedCommitted #8 to 8.x-1.x. Thanks for the contribution!
Comment #13
jelhan commentedA release including fix would be nice.
Comment #14
rutiolma+1 for a new release.
Comment #15
csedax90 commented+1, we need a new stable release
Comment #16
frjo commentedNew release is out.
Comment #17
scottsawyerHere is how I am handling git libraries that don't have a composer.json:
In my root composer.json, under "repositories":
At the time of this comment, the current tag is 1.6.4.
To install the package, I just run composer require jackmoore/colorbox and it installs colorbox in web/libraries/colorbox
Hope this helps someone.
Comment #18
karolus commented@scottsawyer,
Thanks for this post--I added it to my composer.json file, but when running
composer require jackmoore/colorbox, get this error:This happens regardless of my minimum stability settings. Anything else you did?
I did find a solution that worked here.