composer / installers

A Multi-Framework Composer Library Installer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Support for "Generic" Library

mikemadison13 opened this issue · comments

I've come across a number of javascript packages that support composer (good) but have a type of library (which can't be remapped, bad). Is it possible to add generic "library" support so that composer-installs can map these to the appropriate location?

Example:
https://github.com/harvesthq/chosen/blob/master/composer.json#L30

I'd love to be able to map this to docroot/libraries for Drupal (like I can a drupal-library).

IMO JS packages should be installed via npm/yarn, so I don't really like to add support for this.

If you really must install these via Composer, you can look at https://asset-packagist.org/ too - or https://github.com/oomphinc/composer-installers-extender which allows overriding all packages paths. I disagree these things are good ideas, but they exist..

@Seldaek While as someone who develops in many different stacks I agree with your stance; the reality is that in some stacks the infrastructure to add a Node.js based tool for a PHP project can be quite disruptive and not needed when library maintainers package with Composer ❤️

We have a great workaround in the package you linked, but that's currently broken specifically for the library type. Do you perhaps have some time to take a look at oomphinc/composer-installers-extender#26 and see if you could help us figure out how to work with the latest composer/installers version to make it work again? Thanks 🙏