Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle library? #2

Open
laryn opened this issue Mar 3, 2019 · 4 comments
Open

Bundle library? #2

laryn opened this issue Mar 3, 2019 · 4 comments

Comments

@laryn
Copy link
Member

laryn commented Mar 3, 2019

Many library specific Backdrop modules will bundle the library directly, so that could be considered here to make installation one step and achievable through the Project Installer.

@Pepenauta
Copy link
Member

I will keep it in mind for the next version, thanks for the suggestion.

@alanmels
Copy link
Member

alanmels commented Jul 22, 2020

Here is the relevant quote from https://backdropcms.org/project/libraries that might be useful to this issue:

The Libraries API contrib module has been deprecated, as equivalent functionality has been added to Backdrop core.

If a module you're trying to use depends on Libraries API, please suggest to the module maintainer that they update their module to use core's library functions instead.

If you're a module maintainer and currently depend on Libraries API, please replace Libraries API-specific functions with their Backdrop core equivalents:

hook_libraries_info() -> hook_library_info()
hook_libraries_info_alter() -> hook_library_info_alter()
libraries_load() -> backdrop_add_library()
libraries_info() -> backdrop_get_library()

Note that this isn't simply a matter of renaming the functions. You will need to rewrite some of your code. Check the API documentation for more information.

In general, Libraries API shouldn't be needed on Backdrop sites, since 3rd party libraries should be bundled into the modules that require them.

@Pepenauta
Copy link
Member

Hi @alanmels, thanks for alert me about this issue. Now I'm working to remove the dependency. Regards!

@quicksketch
Copy link
Member

I think @laryn's request about making it work through the Project Browser is the best reason to bundle the library. However, I do like that this module already does not require Libraries API and it allows a customized build of prism.js to be used. The download for Prism requires you to select which languages should be supported, as well as a theme. So even if the library is bundled with some defaults, I appreciate being able to use a custom build if one exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants