ctree
What is ctree?
Through nodeJS quickly generate project directory tree structure. There are four ways:
- server - Open the local server to view tree
- img - According to the directory structure spanning tree images
- page - According to the directory structure to generate the page
- log - According to the directory structure in the shell, default it
dependencies
Usage
# globel installnpm install -g ctree# local installnpm install ctree# readyctree
Option
Can through two ways to configure ctree:
- Through
.js
configuration (default:.dirrc.js
) - Through the command to configure.
The priority is command
> .js
> default
default option:
moduleexports = path: './src' img_path: './dir.png' page_path: './dir.html' port: 233
.js
setting
through // .dirrc.jsmoduleexports = path: './test' img_path: './tree.jpg' page_path: './tree.html' port: 233
command
setting
through - project path (default:
./src
) example:
ctree -p src
or
ctree --path=src
- custom config (default:
./dirrc.js
) example:
ctree -c /config/dirrcjs
or
ctree --config=/config/dirrcjs
- set port (default:
233
) example:
ctree server -d 8080
or
ctree server --port=8080
- The path of the generated image (default:
./index.png
) example:
ctree img -i imgjpg
or
ctree img --img_path=imgjpg
- The path of the generated html (default:
./dir.html
) example:
ctree img -h pmhtml
or
ctree img --page_page=pmhtml