-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from corbob/Add-Snippets
Add Snippets
- Loading branch information
Showing
6 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*.zip | ||
PowerShellEditorServices/ | ||
Snippets/ | ||
.pses | ||
node_modules | ||
out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
Write-Host Starting download of Snippets from vscode-powershell | ||
if (!$IsCoreCLR) { | ||
# We only need to do this in Windows PowerShell. | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
} | ||
|
||
# Fail on anything | ||
$ErrorActionPreference = "Stop" | ||
# Progress doesn't display properly in vim | ||
$ProgressPreference = "SilentlyContinue" | ||
|
||
Push-Location $PSScriptRoot | ||
|
||
$download = "https://raw.githubusercontent.com/PowerShell/vscode-powershell/master/snippets/PowerShell.json" | ||
|
||
$dir = "$PSScriptRoot/Snippets/" | ||
|
||
$null = New-Item -Path $dir -ItemType Directory -Force | ||
Invoke-WebRequest $download -OutFile "$dir\PowerShell.json" | ||
|
||
Pop-Location | ||
|
||
Write-Host Completed downloading Snippets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters