New-DevProject.ps1
|
function New-DevProject { [CmdletBinding()] param( [Parameter(Mandatory)] [string]$Name, [Parameter()] [string]$Path = (Get-Location).Path ) $ProjectRoot = Resolve-DtContainedPath -BasePath $Path -ChildName $Name if (Test-Path $ProjectRoot) { throw "Project '$Name' already exists at $Path" } New-Item -ItemType Directory -Path $ProjectRoot -Force | Out-Null New-DevEnvironment -Path $ProjectRoot New-DevConfig -Path $ProjectRoot Write-Host "✔ Project created: $ProjectRoot" -ForegroundColor Green } |