nightcatsama
v1.0.1
Published
for oneself
Downloads
4
Readme
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 install
npm install -g ctree
# local install
npm install ctree
# ready
ctree
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:
module.exports = {
path: './src',
img_path: './dir.png',
page_path: './dir.html',
port: 233
}
through .js
setting
// .dirrc.js
module.exports = {
path: './test',
img_path: './tree.jpg',
page_path: './tree.html'
port: 233
}
through command
setting
- project path (default:
./src
) example:
ctree -p src
or
ctree --path=src
- custom config (default:
./dirrc.js
) example:
ctree -c ./config/.dirrc.js
or
ctree --config=./config/.dirrc.js
- 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 img.jpg
or
ctree img --img_path=img.jpg
- The path of the generated html (default:
./dir.html
) example:
ctree img -h pm.html
or
ctree img --page_page=pm.html