Files
runner-images/images/win/scripts/Installers/Validate-NodeLts.ps1
2020-06-02 20:07:12 +03:00

38 lines
997 B
PowerShell

################################################################################
## File: Validate-NodeLts.ps1
## Desc: Validate nodejs-lts and other common node tools.
################################################################################
if ((Get-Command -Name 'node') -and (Get-Command -Name 'npm'))
{
Write-Host "Node $(node --version) on path"
Write-Host "Npm $(npm -version) on path"
}
else
{
Write-Host "Node or npm is not on path"
exit 1
}
if ((Get-Command -Name 'gulp') -and (Get-Command -Name 'grunt') -and (Get-Command -Name 'cordova') -and (Get-Command -Name 'yarn'))
{
Write-Host "Gulp $(gulp -version) on path"
Write-Host "Grunt $(grunt -version) on path"
Write-Host "Yarn $(yarn -version) on path"
}
else
{
Write-Host "One of Gulp, Grunt, Cordova, or Yarn is not on the path."
exit 1
}
if (Get-Command -Name 'lerna')
{
Write-Host "lerna $(lerna --version) on path"
}
else
{
Write-Host "lerna is not on path"
exit 1
}