Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Add parameter ExtractWebParts to command Add-PnPFileToProvisioningTemplate #2288

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

stevebeauge
Copy link
Contributor

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/SharePoint/PnP-PowerShell/blob/dev/CONTRIBUTING.md

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

What is in this Pull Request ?

This PR adds a switch parameter ExtractWebPart to the command Add-PnPFileToProvisioningTemplate. When set, if the file is a classic page, its webparts are included in the target provisioning template

Steve B added 3 commits October 3, 2019 11:04
- parameter checking
- Methods split to improve maintenability
- speed improvements (StringExtensions.ReplaceCaseInsensitive)
- formatting
@KoenZomers
Copy link
Collaborator

Thanks for this contribution @stevebeauge. Trying to validate your submission. Can you elaborate why the code change in Commands/Utilities/StringExtensions.cs would be necessary? You write to make it more reliable. Is there any concrete scenario where the current code fails to do what it needs to do? Otherwise I would say don't try to fix something that isn't broken. Can you elaborate on your thoughts on this?

@stevebeauge
Copy link
Contributor Author

Thanks for this contribution @stevebeauge. Trying to validate your submission. Can you elaborate why the code change in Commands/Utilities/StringExtensions.cs would be necessary? You write to make it more reliable. Is there any concrete scenario where the current code fails to do what it needs to do? Otherwise I would say don't try to fix something that isn't broken. Can you elaborate on your thoughts on this?

@KoenZomers : it's in fact a performance improvement. My comment was maybe a bit confusing. The background of this optimization came from a stackoverflow answer.

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

Successfully merging this pull request may close these issues.

3 participants