You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.5 KiB

10 years ago
  1. param($installPath, $toolsPath, $package, $project)
  2. . (Join-Path $toolsPath common.ps1)
  3. # Determine the file paths
  4. $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
  5. $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
  6. if (Test-Path $projectIntelliSenseFilePath) {
  7. if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) {
  8. # The intellisense file in the project matches the file in the tools folder, delete it
  9. if ($scriptsFolderProjectItem -eq $null) {
  10. # No Scripts folder
  11. exit
  12. }
  13. try {
  14. # Get the project item for the intellisense file
  15. $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName)
  16. }
  17. catch {
  18. # The item wasn't found
  19. exit
  20. }
  21. # Delete the project item
  22. Delete-ProjectItem $intelliSenseFileProjectItem
  23. }
  24. else {
  25. $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf
  26. Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta
  27. }
  28. }
  29. else {
  30. # The intellisense file was not found in project
  31. Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath"
  32. }
  33. # Update the _references.js file
  34. Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx