Allow themes/modules to libraries via their own *.libraries.yml

Created on 21 July 2023, over 1 year ago

Problem/Motivation

Currently, the only way to declare libraries that Style Selector should attach when during rendering is via the module config page. Investigate a way to allow them to create entries in their own *.libraries.yml file that will be picked up and included as appropriate.

This should also allow removal of style_selector_demo.install.

Proposed resolution

Scan libraries for style_selector keys, e.g:

  • style_selector_shared
  • style_selector_admin
  • style_selector_theme

Implement a helper method that gathers these "declared" libs and merges with any config libs.

Update anywhere libs are attached to use the new helper method.

Remaining tasks

  • Code.
  • Test.
  • Merge.

User interface changes

Add a way to list libraries provided by other modules/themes on the module config page.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024