-
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 2 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 |
---|---|---|
|
@@ -408,6 +408,8 @@ function _emulsify_get_files_to_alter() { | |
'emulsify.theme', | ||
'emulsify.breakpoints.yml', | ||
'emulsify.libraries.yml', | ||
'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. It looks like these two lines should be removed since they are already copied by default when the slim option is not used. See a few lines down where we copy the entire contents of the 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. @ccjjmartin, I was not aware of the
I think the following line of code is trying to copy a directory that does not exist - |
||
'components/_patterns/01-atoms/04-images/icons/_icon.twig', | ||
); | ||
// If we would like to have a bare copy we use is slim option. | ||
if (drush_get_option('slim') === TRUE) { | ||
|
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