Add support for Asset globs

Created on 31 March 2025, 7 days ago

Pinto [library] 0.2.0 added support for Asset globs, but was not added in 📌 Integrate 0.2.0 and Poco from dpi/pinto Active since I found typical issues related to how Drupal libraries are relative to app root, and the generic local asset attributes, Css and Js, don't know how to find files (unless they are absolute).

Integration to happen in this spun-out ticket, after probably more abstraction work in dpi/pinto lib.

Feature request
Status

Active

Version

0.2

Component

Code

Created by

🇦🇺Australia dpi Perth, Australia

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

Merge Requests

Comments & Activities

  • Issue created by @dpi
  • Merge request !20Resolve #3516355 "Asset globs" → (Merged) created by dpi
  • 🇦🇺Australia dpi Perth, Australia

    Also finding that adding asset on a List, where not all components have an asset with that asset name, an error is shown.

    As a part of this we should be able to validate whether a file truly exists, and add it conditionally.

    Maybe consider adding a param to Asset attr that can ignore non existent files, or throw errors on missing files (default).

    Of course, otherwise the Asset attr can be added to individual components/enum-case rather than an asset-attr thats echo'ed from the top of an enum.

  • 🇦🇺Australia dpi Perth, Australia

    For #3, for now, changed to exception if missing file, unless the asset is a glob in which no exceptions are thrown if nothing was found.

  • 🇦🇺Australia dpi Perth, Australia
    • dpi committed c5181c91 on 1.x
      Issue #3516355 by dpi: ✨ Add support for Asset globs
      
  • 🇦🇺Australia dpi Perth, Australia
Production build 0.71.5 2024