appsnbcbweicheng 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appsnbcbweicheng",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
Binary file
package/readme.md CHANGED
@@ -1,3 +1,5 @@
1
+ 1.1.8 git 插件
2
+ 1.1.7 show-tree 优化层级
1
3
  1.1.6 show-tree
2
4
  1.1.5 readme
3
5
  1.1.4 vscode 1.92.2
package/public/show.txt DELETED
@@ -1,41 +0,0 @@
1
- function Show-Tree {
2
- param (
3
- [string]$Path = ".",
4
- [int]$Depth = 1
5
- )
6
-
7
- function Write-Tree {
8
- param (
9
- [System.IO.FileSystemInfo[]]$items,
10
- [string]$prefix = "",
11
- [bool]$isLastParent = $false
12
- )
13
-
14
- for ($i = 0; $i -lt $items.Count; $i++) {
15
- $item = $items[$i]
16
- $isLastItem = ($i -eq $items.Count - 1)
17
-
18
- # 根据层级输出前缀符号
19
- $currentPrefix = if ($isLastParent) { "$prefix " } else { "$prefix│ " }
20
-
21
- # 设置不同颜色:文件和文件夹
22
- if ($item.PSIsContainer) {
23
- Write-Host "$prefix├──" -NoNewline; Write-Host " $($item.Name)" -ForegroundColor Cyan
24
- } else {
25
- Write-Host "$prefix├──" -NoNewline; Write-Host " $($item.Name)" -ForegroundColor Green
26
- }
27
-
28
- # 如果是目录且需要递归调用
29
- if ($item.PSIsContainer -and $Depth -gt 1) {
30
- Write-Tree (Get-ChildItem -Path $item.FullName) $currentPrefix $isLastItem
31
- }
32
- }
33
- }
34
-
35
- # 获取初始层的项目并开始递归输出
36
- $items = Get-ChildItem -Path $Path
37
- Write-Tree -items $items
38
- }
39
-
40
- # 执行函数,查看结果
41
- Show-Tree -Path . -Depth 2