-
Notifications
You must be signed in to change notification settings - Fork 70
Twig copy script incorrect #254
Comments
Just tested this little beauty and it worked. I will find some time to clone and do a PR...
|
Thanks @evanmwillhite - an alternative to my script has been suggested to setup autoloading for the library (https://github.com/drupal-pattern-lab/bem-twig-extension/blob/master/composer.json) We can add
Need to check the |
I am liking the second idea (autoload with composer). I wonder if this would require us to do some refactoring of the bem function repository since out bem file isn't located underneath a /src (preferred) or /lib directory: https://github.com/drupal-pattern-lab/bem-twig-extension I don't know how many other projects are dependent upon it but they would require the composer.json file update too. |
@ccjjmartin any more research here? Would we also need to do this for the other twig extensions as well? https://github.com/drupal-pattern-lab/bem-twig-extension |
https://github.com/fourkitchens/emulsify/blob/develop/scripts/twig_functions.sh does not really work due to the way in which the file is found. Assuming the parent directory tree is one of a number of options is inelegant and not working for my use case.
For example: my theme is located in a multi-site install under
sites/[sitename]/themes/custom/[themename]
which even the long path in Line 5 will not find. I could edit the script to accommodate the extra directory layers but I just have a feeling there's a better way to find the file.Unfortunately I am not a Bash script expert so would need some help here!
Some combination of
find -f -name bem.functions.php
anddirname
I think will work but there are obviously issues around the OS and where the website is hosted (although I suspect/var/www
would be most common)The text was updated successfully, but these errors were encountered: