Public/Coding/Get-EdenTemplates.ps1
function Get-EdenTemplates { <# .SYNOPSIS Gets the list of Eden templates availabe in the ./Eden/Templates folder. .DESCRIPTION Expects that teamplets are stored in a two level format under the ./Eden/Templates folder. The top level (directly under ./Eden/Templates) is a grouping folder that usually matches the name of the GitHub repository that the templates were installed from. They can also be used to organize the templates by type. .EXAMPLE PS> Get-EdenTemplates or PS> e-ct Grouping1/Temlpate1 Grouping1/Temlpate2 Grouping2/Temlpate1 Grouping2/Temlpate2 #> [CmdletBinding()] param( ) $location = Get-Location try { $loggingPrefix = "Eden Coding" if (!(Test-Path "./Eden/Templates")) { Write-EdenInfo "No templates installed." $loggingPrefix return } Get-ChildItem -Path "./Eden/Templates" -Directory | ForEach-Object { $parent = $_ Get-ChildItem -Path $_ -Directory | ForEach-Object { Write-Host "$($parent.Name)/$($_.Name)" } } } catch { Write-EdenError "Error getting the Eden service component templates. Message: '$($_.Exception.Message)'" $loggingPrefix } finally { Set-Location $location } } New-Alias ` -Name e-ct ` -Value Get-EdenTemplates ` -Force |