-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow installing Plugins/Themes into an arbitrary folder #1803
Conversation
f402cb8
to
6b3b5a5
Compare
680cd19
to
2e376d2
Compare
@dd32 would the new directory resources work for your use case? |
I don't think the directory resources solve for the same use-case. This is about giving the plugin directory an arbitrary name – that would be a useful feature. I struggled with that myself. @dd32 This is a useful change, thank you! It needs a rebase and I'd change |
Directory resource does look like a nice change! But yeah not overly useful for this case.
On it!
Yeah, I wasn't overly loving it, There's an existing |
TargetFolderName sounds nice, thank you! |
Motivation for the change, related issues
See #1802
This allows for installing a user-generated ZIP file into a specific theme/plugin path.
Implementation details
InstallAssetOptions
has a new param,targetSlug
(to match it's existingtargetPath
) which if set the ultimate install path istargetPath/targetSlug
. If the param is not set, it defaults to guessing from the ZIP filename and ZIP contents as current.InstallPluginOptions
andInstallThemeOptions
both gain the same parameter, and pass it through if set.InstallThemeOptions
was previously not actually in use, this fixes that, bringing it inline withInstallPluginOptions
.Tests are a bit of a weird mess, as the testing structure doesn't cleanup between iteration runs, and the helper methods are different between each section.
zipFiles
helper from the plugin tests should probably be a common helper instead.The tests should show the current "issue" with 6b3b5a5 failing, and the latest changeset resolving that error.
Testing Instructions (or ideally a Blueprint)
This should display a admin page with the following output: