Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Scaffolding Script - PATH Support #271

Open
ccjjmartin opened this issue Jul 6, 2018 · 0 comments
Open

Scaffolding Script - PATH Support #271

ccjjmartin opened this issue Jul 6, 2018 · 0 comments

Comments

@ccjjmartin
Copy link
Collaborator

Purpose:

  • Currently the emulisfy.php script doesn't properly replace paths.

Priority Notes:

  • The priority for the feature is likely low as it is pretty easy to replace theme paths when creating a new theme
  • The need for this might be limited to a single file, needs some additional research into how wide spread this might be

Example of need for this:

Original Discussion

Additional Implementation Details:

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 the YOURTHEME versus emulsify. 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 called PATH and then it drops in the theme path.

Alterations are defined in the _emulsify_get_alterations function which is currently only doing these:

'Emulsify' => $human_readable_name,
'emulsify' => $machine_name,
'Theme that uses Pattern Lab v2' => $description,
'hidden: true' => '',

It would be pretty easy to add a new line:

'PATH' => $path,

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants