Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Is Dependency injections flawless with Drupal? Can we separate styles? #57

@eeepam

Description

@eeepam

How this dependency injections works with Drupal?

I just installed and tested this system. Really awesome but I quite does not understand how naming works. When i install tabs molecules via emulsify cli it's grab well. But

{{ attach_library('emulsify/tabs') }}

This machine name is not converted automatically. So it's not match with my theme id which is my_awesome_theme (I just followed docs 😄)

So It's generates error.

image

I think we need some works on dependency system and replacing these dynamic machine names.

Because for now it's statically placed.

https://github.com/emulsify-ds/emulsify-drupal/blob/83bde70d36b8fe2c6074655e7fcee9366b6030f9/emulsify.libraries.yml#L19

To solve that problem we can use this kind hook and creates library for each atom/molecule etc.

https://www.drupal.org/project/drupal/issues/3092496

Part One: machine name tokenization to automatically update these names when grabbing these components to our newly created theme
Part Two: library dependency chain for all atoms/molecules etc. + webpack config for individually scss building + hook to load all libraries

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions