|
90 | 90 | $PublicFunctionsFolder = Join-Path $ModuleSourceFolder.FullName 'functions\public' | Get-Item
|
91 | 91 | Get-ChildItem -Path $DocsOutputFolder -Recurse -Force -Include '*.md' | ForEach-Object {
|
92 | 92 | $file = $_
|
93 |
| - Write-Host "Processing: $file" |
| 93 | + $relPath = [System.IO.Path]::GetRelativePath($DocsOutputFolder.FullName, $file.FullName) |
| 94 | + Write-Host " - $relPath" |
| 95 | + Write-Host " Path: $file" |
94 | 96 |
|
95 | 97 | # find the source code file that matches the markdown file
|
96 | 98 | $scriptPath = Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force | Where-Object { $_.Name -eq ($file.BaseName + '.ps1') }
|
97 |
| - Write-Host "Found script path: $scriptPath" |
| 99 | + Write-Host " PS1 path: $scriptPath" |
98 | 100 | $docsFilePath = ($scriptPath.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName).Replace('.ps1', '.md')
|
99 |
| - Write-Host "Doc file path: $docsFilePath" |
| 101 | + Write-Host " MD path: $docsFilePath" |
100 | 102 | $docsFolderPath = Split-Path -Path $docsFilePath -Parent
|
101 | 103 | $null = New-Item -Path $docsFolderPath -ItemType Directory -Force
|
102 | 104 | Move-Item -Path $file.FullName -Destination $docsFilePath -Force
|
103 | 105 | }
|
104 | 106 | # Get the MD files that are in the public functions folder and move them to the same place in the docs folder
|
105 | 107 | Get-ChildItem -Path $PublicFunctionsFolder -Recurse -Force -Include '*.md' | ForEach-Object {
|
106 | 108 | $file = $_
|
107 |
| - Write-Host "Processing: $file" |
| 109 | + $relPath = [System.IO.Path]::GetRelativePath($PublicFunctionsFolder.FullName, $file.FullName) |
| 110 | + Write-Host " - $relPath" |
| 111 | + Write-Host " Path: $file" |
| 112 | + |
108 | 113 | $docsFilePath = ($file.FullName).Replace($PublicFunctionsFolder.FullName, $DocsOutputFolder.FullName)
|
109 |
| - Write-Host "Doc file path: $docsFilePath" |
| 114 | + Write-Host " MD path: $docsFilePath" |
110 | 115 | $docsFolderPath = Split-Path -Path $docsFilePath -Parent
|
111 | 116 | $null = New-Item -Path $docsFolderPath -ItemType Directory -Force
|
112 | 117 | Move-Item -Path $file.FullName -Destination $docsFilePath -Force
|
|
0 commit comments