File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # requires -Module EZOut
2+ # Install-Module EZOut or https://github.com/StartAutomating/EZOut
3+ $myFile = $MyInvocation.MyCommand.ScriptBlock.File
4+ $myRoot = $myFile | Split-Path | Split-Path
5+ $myModuleName = $myFile | Split-Path | Split-Path | Split-Path - Leaf
6+ Push-Location $myRoot
7+ $formatting = @ (
8+ # Add your own Write-FormatView here,
9+ # or put them in a Formatting or Views directory
10+ foreach ($potentialDirectory in ' Formatting' , ' Views' , ' Types' ) {
11+ Join-Path $myRoot $potentialDirectory |
12+ Get-ChildItem - ea ignore |
13+ Import-FormatView - FilePath {$_.Fullname }
14+ }
15+ )
16+
17+ $destinationRoot = $myRoot
18+
19+ if ($formatting ) {
20+ $myFormatFilePath = Join-Path $destinationRoot " $myModuleName .format.ps1xml"
21+ # You can also output to multiple paths by passing a hashtable to -OutputPath.
22+ $formatting | Out-FormatData - Module $MyModuleName - OutputPath $myFormatFilePath
23+ }
24+
25+ $types = @ (
26+ # Add your own Write-TypeView statements here
27+ # or declare them in the 'Types' directory
28+ Join-Path $myRoot Types |
29+ Get-Item - ea ignore |
30+ Import-TypeView
31+
32+ )
33+
34+ if ($types ) {
35+ $myTypesFilePath = Join-Path $destinationRoot " $myModuleName .types.ps1xml"
36+ # You can also output to multiple paths by passing a hashtable to -OutputPath.
37+ $types | Out-TypeData - OutputPath $myTypesFilePath
38+ }
39+ Pop-Location
You can’t perform that action at this time.
0 commit comments