Hello Friends!
I'm currently playing around with / attempting to create a theme from scratch. I'm now looking to clean things up a little bit and remove much of the default libraries / css / javascript that is added. I've managed to remove modernizr but my biggest issue is figuring out how the paths relate to the actual libraries.
example: There is a piece of javascript called collapse.js which doesn't seem to be remove by core/misc/collapse, core/collapse etc.
My question is, is there an easy way to view all the running 'libraries' and their corresponding relative paths according to Drupal 8?
Thank you,
Tyler
Comments
For anyone looking for an
For anyone looking for an answer in the meantime, I have found a core.libraries.yml file located in core/ which will show you the names of the core libraries which you can disable via core/*libraryname*.
Tyler
Use exclude in theme .info file
Hi,
If you want to exclude some libraries from an existing theme, you can use "exclude" function.
Open theme info file and add exclude lines like this example:
exclude[js][] = 'misc/jquery.js'
This example exclude jquery.js.
To view all libraries and
To view all libraries and assets etc, implement
hook_library_info_alter()
, install the Devel module andkpr($libraries);
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api....
Normal way to remove, extend a library or remove/override an asset, see this docs page: https://www.drupal.org/theme-guide/8/assets
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.