You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: The following text is from the original issue FH-Inway#122 written by @FriedrichWeinmann on my fork. I copied the content over to this issue on the main repository for better visibility and since we want to address the feedback here instead of on my fork.
Heya, thanks again for the help on PSModuleDevelopment.
I must admit, I got a bit curious on about what you were using it for and found this rather interesting project here :)
Wow, you spent quite some time on all this 👍
That said, I've found a few things where I thought "Huh, a few pointers might make it more convenient for you", so ... while there's nothing wrong, really, I found a few things I wanted to show how PSFramework can make your life a bit easier :)
You are currently using Stop-PSFFunction mostly as an enhanced Write-Warning.
Not a problem, but here's what else it can do (and what I had in mind for it):
@FriedrichWeinmann Thanks a lot!
I just noticed FH-Inway#122 today by accident, since I don't have notifications on for my fork repo and you didn't @-mention me 😄
Hope you don't mind I copied your feedback here to the main repo. I also believe you know the main maintainer @Splaxi of this repo 😉
Thanks again for your feedback, we will take a look and try to incorporate it.
Note: The following text is from the original issue FH-Inway#122 written by @FriedrichWeinmann on my fork. I copied the content over to this issue on the main repository for better visibility and since we want to address the feedback here instead of on my fork.
Heya, thanks again for the help on PSModuleDevelopment.
I must admit, I got a bit curious on about what you were using it for and found this rather interesting project here :)
Wow, you spent quite some time on all this 👍
That said, I've found a few things where I thought "Huh, a few pointers might make it more convenient for you", so ... while there's nothing wrong, really, I found a few things I wanted to show how PSFramework can make your life a bit easier :)
Type Conversion and Select-PSFObject
Select-PSFObject can also do inline type-conversion.
This ...
... could also be that:
And possibly even this
Enabling Stop-PSFFunction
You are currently using
Stop-PSFFunction
mostly as an enhancedWrite-Warning
.Not a problem, but here's what else it can do (and what I had in mind for it):
The fun part is now:
When a user actually does want a red error (e.g. for a try/catch), they can enable it on demand:
You may also find this other command quite helpful when it comes to executing code that might fail.
Parameter Type for Paths
Sometimes you want to accept paths as parameter.
Which then means we usually take a string and then later test, whether it exists, etc..
Example:
With PSFramework, you can add path resolution (relative, wildcards, etc.) and validation to the module:
Currently it is limited to allowing multiple paths (as if it were a string-array), the next version will have single-item variants.
Hashtable Cloning made easy
You are doing hashtable cloning to simplify splatting using
Get-DeepClone
:PSFramework can help with that:
Not a PSFramework thing, but while I'm at it ... IsNullOrEmpty
In pretty much all cases, you can replace
[string]::IsNullorEmpty
with-not
:Could be:
The text was updated successfully, but these errors were encountered: