| |
| $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
|
|
| $exe="" |
| if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
| |
| |
| $exe=".exe" |
| } |
| $ret=0 |
| if (Test-Path "$basedir/node$exe") { |
| |
| if ($MyInvocation.ExpectingInput) { |
| $input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args |
| } else { |
| & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args |
| } |
| $ret=$LASTEXITCODE |
| } else { |
| |
| if ($MyInvocation.ExpectingInput) { |
| $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args |
| } else { |
| & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args |
| } |
| $ret=$LASTEXITCODE |
| } |
| exit $ret |
|
|