New-DevConfig.ps1
|
function New-DevConfig { [CmdletBinding()] param( [Parameter()] [string]$Path = (Get-Location).Path ) $ConfigPath = Join-Path $Path ".devconfig.json" if (Test-Path $ConfigPath) { Write-Verbose ".devconfig.json already exists → skipping" return } $Config = @{ projectName = Split-Path $Path -Leaf created = (Get-Date).ToString("o") version = "1.0" tools = @{ prettier = $true markdownlint = $true analyzer = $true } } $Config | ConvertTo-Json -Depth 5 | Set-Content -Path $ConfigPath -Encoding UTF8 Write-Host "✔ Created .devconfig.json" -ForegroundColor Green } |