Skip to content

Commit

Permalink
feat: EZOut Container.init.ps1 ( Fixes #242 )
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating committed Aug 31, 2024
2 parents b6eedc4 + ebacbf8 commit 6057944
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions EZOut.commands.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -3508,8 +3508,15 @@


$membersByType = @{}
$CommonParentPath = $null
foreach ($fp in $FilePath) {
$filePathRoot = Get-Item -Path $fp
if (-not $filePathRoot) { continue}
if (-not $CommonParentPath) {
$CommonParentPath = $filePathRoot.Parent.FullName
} elseif ($CommonParentPath) {
$CommonParentPath | Split-Path -CommonPrefix $filePathRoot
}
$filesBeneathRoot = Get-ChildItem -Recurse -Path $fp -Force

:nextFile foreach ($fileBeneathRoot in $filesBeneathRoot) {
Expand Down Expand Up @@ -3636,7 +3643,7 @@
}

# Do not Skip format/view/control files (this allows them to be in the same directory as types, if that is preferred)
$isFormatFile = $item.Name -match '\.(?>format|view|control)\.ps1$'
$isFormatFile = $item.Name -match '\.(?>format|view|control)\.ps1$'

$itemName =
$item.Name.Substring(0, $item.Name.Length - $item.Extension.Length)
Expand Down Expand Up @@ -3777,6 +3784,12 @@
}
}

.sql {
if (-not $noteProperty.Contains($itemName)) # SQL files become note properties.
{
$noteProperty[$itemName] = $fileText
}
}

#endregion .txt Files
#region .psd1 Files
Expand Down Expand Up @@ -3831,7 +3844,7 @@ return `$convertedFromJson
"@)
}
}
#endregion JSON files
#endregion JSON files
#region CliXML files
# Clixml files are embedded into a ScriptProperty and Deserialized.
.clixml {
Expand Down

0 comments on commit 6057944

Please sign in to comment.