ProjectTemplate/New-ProjectFromTemplate.ps1

function New-ProjectFromTemplate {
    <#
    .SYNOPSIS
        Creates empty project structure according to the IT integro project template
 
    .DESCRIPTION
        This function creates directories for source code files, build scripts and automated tests, README and INSTRUCTION files according to the IT intego project template
 
    .EXAMPLE
        New-ProjectFromTemplate -Location ~/Desktop/MyProject
 
    .NOTES
        The template includes:
        README.md file
        Apps directory - for storing application source files
        Tests directory - for storing automated tests
        Scripts directory - for storing build scripts and CI pipeline specification
    #>

    [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', '')]
    param (
        # Specifies the directory where the project will be created
        [string] $Location = './'
    )
    if (-Not(Test-Path $Location)) {
        New-Item -Path $Location -ItemType Directory
    }
    $RootDirectories.ForEach({
        $path = Join-Path $Location -ChildPath $_
        New-Item -Path $path -ItemType Directory
    })
    $AppsInstructionContents > (Join-Path $Location 'Apps/INSTRUCTIONS.md')
    $ScriptsInstructionContents > (Join-Path $Location 'Scripts/INSTRUCTIONS.md')
    $TestsInstructionContents > (Join-Path $Location 'Tests/INSTRUCTIONS.md')
    $ReadmeContents > (Join-Path $Location 'README.md')
}

Export-ModuleMember -Function New-ProjectFromTemplate