Skip to content

Commit

Permalink
Pog.psm1: Add intro comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejKafka committed Dec 26, 2024
1 parent e3158b3 commit d22e0db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/Pog/Pog.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### This is the main script module of Pog. Most of the actual functionality is implemented in C# in `Pog.dll`,
### which is loaded in `header.ps1`. Cmdlets defined in this module are somewhat half-baked - I typically first
### implement a cmdlet here, see how it works in practice and later rewrite it in C# when I have a clearer idea
### about the design.

using module .\Utils.psm1
. $PSScriptRoot\header.ps1

Expand Down Expand Up @@ -25,13 +30,13 @@ function Edit-PogRoot {
Start-Process $Path
}

<# Ad-hoc template format used to create default manifests in the following 2 functions. #>
### Ad-hoc template format used to create default manifests in the following 2 functions.
function RenderTemplate($SrcPath, $DestinationPath, [Hashtable]$TemplateData) {
$Template = Get-Content -Raw $SrcPath
foreach ($Entry in $TemplateData.GetEnumerator()) {
$Template = $Template.Replace("'{{$($Entry.Key)}}'", "'" + $Entry.Value.Replace("'", "''") + "'")
}
$null = New-Item -Path $DestinationPath -Value $Template
Set-Content $DestinationPath -Value $Template -NoNewline
}

# TODO: support creating new versions of existing packages (either create a blank package, or copy latest version and modify the Version field);
Expand Down

0 comments on commit d22e0db

Please sign in to comment.