Convert any directory tree into JSON or Markdown
npm install treeify-foldernode_modules, dist, etc.
bash
npm install -g folder-to-json
``
Usage
`bash
folder-to-json ./src --output tree.json --format json --exclude node_modules,dist
folder-to-json ./src --output tree.md --format md
`
CLI Options
| Option | Description | Default |
| ----------- | --------------------------------------------- | ----------- |
| --output | Output file path | tree.json |
| --format | Output format: json or md | json |
| --exclude | Comma-separated list of directories to ignore | (none) |
Example Output
$3
`json
{
"src": {
"index.js": null,
"utils": {
"math.js": null
}
}
}
`
$3
`
src/
├── index.js
└── utils/
└── math.js
``