$workspace="C:\Program Files (x86)\Jenkins\workspace\hualian_admin"
$distFolder="C:\Program Files (x86)\Jenkins\workspace\hualian_admin\dist\*"
echo "cd "+$workspace
cd $workspace
echo "npm"
npm install
npm run build --prod
echo "npm ok"
C:\Windows\System32\inetsrv\appcmd.exe stop site "hualian_admin"
#$TargetFolder = "D:\www\hanniu\admin" 
#$Files = get-childitem  $TargetFolder -force
#Foreach ($File in $Files)
#{
##$FilePath=$File.FullName
#Write-Host $FilePath -NoNewline
#Remove-Item -Path $FilePath -Recurse -Force
#}
echo "copy start"
copy-item $distFolder -destination "D:\www\hualian\admin" -Recurse -Force
echo "copy ok"
C:\Windows\System32\inetsrv\appcmd.exe start site "hualian_admin"