Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveStatistics/sources/packages/jQuery.1.8.2/Tools/install.ps1 @ 9604

Last change on this file since 9604 was 9604, checked in by pfleck, 11 years ago

#2063:
Set up basic webpage layout based on WebApplication branch.
Added Asp.Net MVC packages and some helper packages.
Implemented login.

File size: 1.3 KB
Line 
1param($installPath, $toolsPath, $package, $project)
2
3. (Join-Path $toolsPath common.ps1)
4
5# VS 11 and above supports the new intellisense JS files
6$vsVersion = [System.Version]::Parse($dte.Version)
7$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
8
9if (-not $supportsJsIntelliSenseFile) {
10    $displayVersion = $vsVersion.Major
11    Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion"
12    exit
13}
14
15if ($scriptsFolderProjectItem -eq $null) {
16    # No Scripts folder
17    Write-Host "No Scripts folder found"
18    exit
19}
20
21# Delete the vsdoc file from the project
22try {
23    $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js")
24    Delete-ProjectItem $vsDocProjectItem
25}
26catch {
27    Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red
28    exit
29}
30
31# Copy the intellisense file to the project from the tools folder
32$intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName
33try {
34    $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath)
35}
36catch {
37    # This will throw if the file already exists, so we need to catch here
38}
39
40# Update the _references.js file
41AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName
Note: See TracBrowser for help on using the repository browser.