$rootPath = "$PSScriptRoot\.." $tsConfig = "$rootPath\tsconfig.json" $outputPath = "$rootPath\js_output" if(Test-Path $outputPath) { Remove-Item -Path $outputPath -Recurse -Force | Out-Null } tsc -p $tsConfig