-
Notifications
You must be signed in to change notification settings - Fork 70
Improving theme cloning process in order to minimize manual updates #268
Changes from 4 commits
98bc2d1
25998a8
1c572e3
4b7adf4
06d72cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -415,6 +415,8 @@ function _emulsify_get_files_to_alter() { | |
} | ||
else { | ||
return array_merge($default_array, array( | ||
'templates/navigation/menu--main.html.twig', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shaal Can you remove these two lines completely and apply this patch to your branch:
This was originally designed that you can just list the
NOTE: We may want to check to see if anything else unexpectedly broke since the replacements are now actually working throughout the components and templates directories. |
||
'components/_patterns/01-atoms/04-images/icons/_icon.twig', | ||
'components', | ||
'templates', | ||
'README.md', | ||
|
@@ -492,7 +494,6 @@ function _emulsify_get_files_to_copy() { | |
'components/_macros', | ||
'components/_meta', | ||
'components/_twig-components', | ||
'components/css', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, this needed to go. |
||
'components/images', | ||
'components/_patterns/style.scss', | ||
'components/_patterns/00-base/global/01-colors', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shaal I am curious as to the broken behavior you experienced here. Did "emulsify" on this line get replaced? On the line right after this did it not get replaced? I am definitely pro simplifying install processes so I would love to hear more about the bug you encountered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the goal here is to set this as
emulsify
by default so that it can be auto-replaced. In the "before" code, it says to manually enter your theme's machine name. Setting it automatically on cloned theme creation is preferred.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I was focused on the comment containing the string
emulsify
but that actually isn't the main change here. I should have been looking at theYOURTHEME
versusemulsify
. I am good with this change because it makes the out of the box experience better in most scenarios. I will point out that this is not going to work for people who don't put their theme in the root of/themes/
versus/themes/custom/
But that is likely a bigger issue that what we are trying to address here. We should consider replacing this (in another PR not this one) with just a string calledPATH
and then it drops in the theme path.Alterations are defined in the
_emulsify_get_alterations
function which is currently only doing these:It would be pretty easy to add a new line:
And add another parameter for to that same function to pass the path in. When I wrote this I wasn't thinking we would need the PATH within the twig files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created this ticket for follow up on this: #271