File inclusion - LaurentDardenne/Template GitHub Wiki

The INCLUDE directive insert the content of a file.

For the file 'C:\Temp\Test.ps1':

"Inserting the file contents 'C:\Temp\Test.ps1'"

This statements :

(Get-Content -path 'C:\Temp\Main.ps1')|Edit-Template -Include

Transform the main.ps1 file :

 Write-Host 'Before the directive'
 #<INCLUDE %'C:\Temp\Test.ps1'%>"
 Write-Host 'After the directive'

to :

Write-Host 'Before the directive'
Write-Host "Inserting the file contents 'C:\Temp\Test.ps1'"
Write-Host 'After the directive'