1.0.1 • Published 9 years ago
nightcatsama v1.0.1
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
ctreeOption
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:
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 srcor
ctree --path=src- custom config (default:
./dirrc.js) example:
ctree -c ./config/.dirrc.jsor
ctree --config=./config/.dirrc.js- set port (default:
233) example:
ctree server -d 8080or
ctree server --port=8080- The path of the generated image (default:
./index.png) example:
ctree img -i img.jpgor
ctree img --img_path=img.jpg- The path of the generated html (default:
./dir.html) example:
ctree img -h pm.htmlor
ctree img --page_page=pm.html