aboutsummaryrefslogtreecommitdiff
path: root/node_modules/gulp/completion/powershell
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-03-27 21:01:33 +0100
commitcc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch)
tree92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/gulp/completion/powershell
parent3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff)
remove node_modules
Diffstat (limited to 'node_modules/gulp/completion/powershell')
-rw-r--r--node_modules/gulp/completion/powershell61
1 files changed, 0 insertions, 61 deletions
diff --git a/node_modules/gulp/completion/powershell b/node_modules/gulp/completion/powershell
deleted file mode 100644
index 08ec4382e..000000000
--- a/node_modules/gulp/completion/powershell
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (c) 2014 Jason Jarrett
-#
-# Tab completion for the `gulp`
-#
-# Usage:
-#
-# To enable powershell <tab> completion for gulp you need to be running
-# at least PowerShell v3 or greater and add the below to your $PROFILE
-#
-# Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)
-#
-#
-
-$gulp_completion_Process = {
- param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
-
-
- # Load up an assembly to read the gulpfile's sha1
- if(-not $global:GulpSHA1Managed) {
- [Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null
- $global:GulpSHA1Managed = new-Object System.Security.Cryptography.SHA1Managed
- }
-
- # setup a global (in-memory) cache
- if(-not $global:GulpfileShaCache) {
- $global:GulpfileShaCache = @{};
- }
-
- $cache = $global:GulpfileShaCache;
-
- # Get the gulpfile's sha1
- $sha1gulpFile = (resolve-path gulpfile.js -ErrorAction Ignore | %{
- $file = [System.IO.File]::Open($_.Path, "open", "read")
- [string]::join('', ($global:GulpSHA1Managed.ComputeHash($file) | %{ $_.ToString("x2") }))
- $file.Dispose()
- })
-
- # lookup the sha1 for previously cached task lists.
- if($cache.ContainsKey($sha1gulpFile)){
- $tasks = $cache[$sha1gulpFile];
- } else {
- $tasks = (gulp --tasks-simple).split("`n");
- $cache[$sha1gulpFile] = $tasks;
- }
-
-
- $tasks |
- where { $_.startswith($commandName) }
- Sort-Object |
- foreach { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', ('{0}' -f $_) }
-}
-
-if (-not $global:options) {
- $global:options = @{
- CustomArgumentCompleters = @{};
- NativeArgumentCompleters = @{}
- }
-}
-
-$global:options['NativeArgumentCompleters']['gulp'] = $gulp_completion_Process
-$function:tabexpansion2 = $function:tabexpansion2 -replace 'End\r\n{','End { if ($null -ne $options) { $options += $global:options} else {$options = $global:options}'