npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

directory-tree-structure

v0.1.8

Published

列出檔案樹狀結構

Downloads

21

Readme

Directory Tree Structure

套件說明

此套件提供一個 dir-tree 指令,可於終端機視窗列印資料夾的樹狀結構。

#如果沒有給參數,預設會以當前路徑執行
dir-tree
# 可以指定要列印的目標
dir-tree --root=D:\\k8s

預設會折疊以下資料夾:

.git
nod_modules
objects

也可以自行指定於 --collapse 參數。

安裝後執行

npm i directory-tree-structure -g

安裝後可於CMD直接執行:

# 預設參數的簡易用法
dir-tree
# 提供路徑參數
dir-tree --root=d:\\k8s
# 完整參數範例,傳入多次 collapse 值以表達陣列參數。
dir-tree --root=D:\\k8s --collapse=nod_modules --collapse=objects

免安裝執行

透過 npx 免安裝執行

# 可傳遞參數給 bin 指令
npx directory-tree-structure --root=d:\\k8s

透過 npm exec 免安裝執行

# 注意要填入雙連字號 -- 靠素 npm 停止解析命令行選項以傳遞參數給套件
npm exec -- directory-tree-structure --root=d:\\k8s

輸出範例

[.]
 ├─[.git]
 │  └─(...)
 ├─[.vscode]
 │  └─launch.json
 ├─[bin]
 │  └─dir-tree
 ├─[node_modules]
 │  └─(...)
 ├─.gitattributes
 ├─.gitignore
 ├─index.js
 ├─package-lock.json
 ├─package.json
 └─ReadMe.md