According to the directory structure of spanning tree
npm install ctree bash
globel install
npm install -g ctree
`
Usage
` bash
Any place, any folder
ctree -p src/
`
Option
Can through two ways to configure ctree:
1. Through .js configuration (default: .dirrc.js)
2. Through the command to configure.
The priority is command > .js > default
default option:
` bash
module.exports = {
path: './src',
ignore: ['node_modules/', '.git/'],
limit: 0,
port: 8080
}
`
$3
` bash
// .dirrc.js
module.exports = {
path: '../ctree/',
ignore: ['node_modules/', '.git/'],
limit: 0,
port: 233
}
`
$3
project path (default: ./src)
example:
` bash
ctree -p src
// or
ctree --path=src
`
custom config (default: ./dirrc.js)
example:
` bash
ctree -c ./config/.dirrc.js
// or
ctree --config=./config/.dirrc.js
`
set port (default: 8080)
example:
` bash
ctree server -d 233
// or
ctree server --port=233
`
The path of the output (default: ./ctree.*)
example:
` bash
ctree img -o ctree.jpg
ctree page -o ctree.html
ctree txt -o ctree.txt
// or
ctree img --output=ctree.jpg
ctree page --output=ctree.html
ctree txt --output=ctree.txt
`
Limit display level, 0 is unlimited (default: 0)
example:
` bash
ctree log -i 3
// or
ctree log --limit=3
`
Ignore files spanning tree (default: ['node_modules/', '.git/'])
example:
` bash
// ignore Folder, File, A single directory wildcard, Inheritable wildcards
ctree -g "['node_modules/', '.gitignore', 'js/.json', 'asset/*.md']"
// or
ctree --ignore="['node_modules/', '.gitignore', 'js/.json', 'asset/*.md']"
``