nightcatsama

1.0.1 • Public • Published

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:

  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

  1. project path (default: ./src) example:
ctree -p src

or

ctree --path=src
  1. custom config (default: ./dirrc.js) example:
ctree -./config/.dirrc.js

or

ctree --config=./config/.dirrc.js
  1. set port (default: 233) example:
ctree server -8080

or

ctree server --port=8080
  1. The path of the generated image (default: ./index.png) example:
ctree img -img.jpg

or

ctree img --img_path=img.jpg
  1. The path of the generated html (default: ./dir.html) example:
ctree img -pm.html

or

ctree img --page_page=pm.html

Readme

Keywords

none

Package Sidebar

Install

npm i nightcatsama

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • nightcatsama