Skip to content

Commit 1eece89

Browse files
author
James Brundage
committed
Adding .EZOut file and updating manifest (re #14 #15)
1 parent 57ec4e2 commit 1eece89

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

PowerShellAI.ezout.ps1

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#requires -Module EZOut
2+
# Install-Module EZOut or https://github.com/StartAutomating/EZOut
3+
$myFile = $MyInvocation.MyCommand.ScriptBlock.File
4+
$myModuleName = 'PowerShellAI'
5+
$myRoot = $myFile | Split-Path
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') {
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+
$myFormatFile = Join-Path $destinationRoot "$myModuleName.format.ps1xml"
21+
$formatting | Out-FormatData -Module $MyModuleName | Set-Content $myFormatFile -Encoding UTF8
22+
Get-Item $myFormatFile
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+
$myTypesFile = Join-Path $destinationRoot "$myModuleName.types.ps1xml"
36+
$types | Out-TypeData | Set-Content $myTypesFile -Encoding UTF8
37+
Get-Item $myTypesFile
38+
}
39+
Pop-Location

PowerShellAI.psd1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ PowerShell GPT AI module allows to integrate with OpenAI API and access GPT-3 mo
1616
'Get-GPT3Completion'
1717
)
1818

19+
FormatsToProcess = 'PowerShellAI.format.ps1xml'
20+
TypesToProcess = 'PowerShellAI.types.ps1xml'
21+
1922
AliasesToExport = @(
2023
'gpt'
2124
)

0 commit comments

Comments
 (0)