Closed EvanLovely closed 6 years ago
@EvanLovely yep, this has been one of those annoying PL thorns that's been bugging me for the longest time.
Lemme take a crack at patching this up one and for all. Seems like we might just need to call this function again after the PL config init initially runs (when anything regenerates)
FileUtil::checkPathFromConfig(self::$options["publicDir"], self::$userConfigPath, "publicDir");
Closing this out since @EvanLovely and I have a working solution via #15
Steps to recreate
That sets everything up fine. Next:
We get this output:
This is the bug I want fixed. It should just see that stuff is missing and do what needs to be done. Here's a few more details on this: All this does is create an empty directory
./public
. It wants us to grabs a new copy of our styleguidkit. When one tries to fix this, typically this is attempted:That doesn't work either; you actually have to run:
So basically if someone deletes
./public
, they also need to delete./vendor
and runcomposer install
again: which is counter-intuitive and a little time consuming.Why I want this is so all compiled files (CSS, JS, PL, etc) can live in a single folder that can be deleted. This would not only allow a reliable clean and recompile step to be done, but allow the public folder to be placed into many other locations.
Background
These are the folders inside a working publicDir after a compile:
That
patterns
folder is what gets deleted and re-compiled when cleanPublic is true - not the whole publicDir folder. The rest is things like PL chrome (the StyleguideKit), so it doesn't make sense to copy it over on each compile; however, if it's missing I want it to fix it when a compile is ran.Thoughts on this @drupal-pattern-lab/core ?