1.0.0 • Published 4 months ago
dir-tree-generator v1.0.0
Dir Tree Generator
Description
A simple Node.js tool to generate a visual directory tree and save it as a text/HTML file.
Installation
npm install
Usage
Generate a directory tree:
node src/index.js --dir <directory_path>
Example:
node src/index.js --dir ./src
The tree output is saved in the output/
folder.
Run Tests
npx mocha tests/testGenerateTree.js
Dependencies
fs
- File system operationspath
- File and directory path handlingyargs
- Command-line argument parsingmocha
- Testing frameworkchai
- Assertion library
Output Example
src/
├── index.js
├── generateTree.js
tests/
├── testGenerateTree.js
output/
├── tree.txt
├── tree.html
License
MIT License
1.0.0
4 months ago