
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
a user-friendly Node.js tool for creating organized directory trees from a root directory. It offers customization options for tailored tree generation and content analysis
npm install dir2tree
const dir2tree=require("dir2tree")
import dir2tree from dir2tree
const MyTree=dire2tree(ROOT,OPTIONS,CALLBACKS)
MyTree.write(Target,"generated_file.json")
ROOT
: The path to the root directory that we want handle. it's required
OPTIONS
: An object containing various configuration options to control the behavior of the tree generation.it's optional
, These options might include :
fileContent
: (Boolean)fileName
: (Boolean)fileExtension
: (Boolean)length
: (Boolean)size
: (Boolean)linesCount
: (Boolean)created
: (Boolean)lastModified
: (Boolean)skip
:
folder
: (String[])file
: (String[])extension
: (String[])sortBy
: (String) , possible values : "names"
,"extension"
,"size"
,"lines"
,"created"
,"lastmodified"
,order
: (Number)CALLBACKS
: it's optional
.write(Target, filename)
.flat(depth, separator)
sequenceDiagram
Your repository ->> dir2tree: ...
dir2tree-->>Your repository:...
name: Generate Directory Tree using zakarialaoui10/dir2tree
on:
push:
branches:
- main
jobs:
build:
permissions :
contents : write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Generate Directory Tree
uses: zakarialaoui10/dir2tree@main
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add -A .
git commit -m "generated by zakarialaoui10/dir2tree"
git push
env:
CUSTOM_TOKEN: ${{ secrets.CUSTOM_TOKEN }}
OWNER : ${{github.repository_owner}}
NAME : ${{github.event.repository.name}}
This projet is licensed under the terms of MIT License .
FAQs
a user-friendly Node.js tool for creating organized directory trees from a root directory. It offers customization options for tailored tree generation and content analysis
We found that dir2tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.