Skip to content

Commit

Permalink
feat: Write-EZFormatFile uses Import-TypeView -Command ( Fixes #238, re
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating committed Jul 7, 2024
1 parent 873d8f2 commit 4b42bf6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Commands/Write-EZFormatFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,18 @@ if ($formatting) {
$types = @(
# Add your own Write-TypeView statements here
# or declare them in the 'Types' directory
$ImportTypeViewOptions = [Ordered]@{}
$myModuleIsLoaded = Get-Module $myModuleName
if ($myModuleIsLoaded) {
$ImportTypeViewOptions.Commands = @($myModuleIsLoaded.ExportedFunctions.Values)
}
# The following code will import all TypeView files in the Types directory (the default)
Join-Path $myRoot Types |
Get-Item -ea ignore |
Import-TypeView
)
if ($types) {
Expand Down

0 comments on commit 4b42bf6

Please sign in to comment.