Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By sprite on
On - Drupal 8 - what are best practices for installing external libraries?
In what subdirectory are people installing external libraries on Drupal 8?
- Note that practices for the location of contrib modules and so on have also apparently changed for D8.
How are module installers detecting external libraries and their locations, and configuring them on Drupal 8?
Comments
=-=
https://www.drupal.org/node/2605130 & http://kevinquillen.com/drupal/2016/01/30/adding-libraries-to-drupal-8 may aid. Based on my read the concept of 'best practices' is still being fleshed out.
requiring "composer" is will severely limit Drupal's audience
Requiring the "composer" tool to install components into Drupal will severely limit the drupal user audience.
Not everyone has SSH access to their Drupal installation environment.
Turning Drupal into a programmer only oriented tool, just seems really foolish.
Please return to an design model and module installation system that doesn't involve running CLI shell commands on a unix terminal.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
I think there are two
I think there are two comments in the issue VM has linked to that are pretty bang on what will ultimately pan out to be our "best practices":
https://www.drupal.org/node/2605130#comment-11089417
https://www.drupal.org/node/2605130#comment-11091343
As you will note it will depend on what the library is, php, js, etc? PHP should be handled via composer, and theme based assts via the theme libraries, probably using whatever you want like Bower, Node, Bundler etc or just including them in the theme, but modules perhaps will use the Libraries API when it's ready.
I think #57 John Albins comments are a good guide, those ideas just make good common sense.
With regards to detecting libraries, well, thats got to be Libraries API and some hook/method from that module, I havent look at the Libraries API module but one assumes you can get data such as version etc, which of course you'll really want.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
ssh - drush - composer ...
I requested SSH access to hosting server and got the following response:
They actually want a copy of my government ID just to give me ssh access to my account on their servers.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
It's becoming the norm these
It's becoming the norm these days, too many fake accounts, if you're in the EU they'll often ask for a copy of your passport. If it's a reputable provider then I'd call it a good thing, rest assured they're looking at everyone in their neighbourhood and therefor safeguarding you as well.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
why not just add them to your
why not just add them to your theme directory?
WFT?
WTF?
Seriously?
Get real.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
(╯°□°)╯︵ ┻━┻
@sprite I don't know who you are replying to, but you can take your appalling attitude to another forum. Speak like that to a fellow member of our community again and I'll personally report it as a code of conduct violation. Take a chill pill.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
@Hadi Farnoud yeah, for sure
@Hadi Farnoud yeah, for sure if it's specific to your theme, no problem. For some modules it can make sense to share a library/resource, for example lets say the new Media modules on D8 all want to leverage a PHP library, it would make sense to have that in one place, e.g. /vendor, or perhaps jQuery update module wants all i'ts jQuery versions in one central place, e.g. /libraries
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.