Include third party JS library into my drupal module I want to include this library into my drupal module. Now I have two problems.


I wanted to use composer manager to get this library, but it's not available on packagist.org. So, I've tried to put it there manually to do not stuck on it. Path is MY_DRUPAL/vendor/malsup/jQuery.blockUI/jquery.blockUI.js
I want to attach this library via hook_page_attachments, but seems I don't know how to define this library in libraries.yml. The problem is that I cannot specify path to folder vendor/ from my_module.libraries.yml, because vendor/ located in root of drupal.


Could somebody give me an advice?

Thanks in advance.
You still put them in the libraries folder (now you can also use a top-level /librariesfolder).

You need the libraries module, just like in 7.x. I'm also not 100% sure how well it works now in 8.x, in the JW Player module, I'm just using it to detect the location of the files: http://cgit.drupalcode.org/jw_player/tree/jw_player.module?h=8.x-1.x#n206