1.2.1 • Published 9 years ago

ctree v1.2.1

Weekly downloads
3
License
-
Repository
github
Last release
9 years ago

ctree

ctree

What is ctree?

Through nodeJS quickly generate project directory tree structure. There are four ways:

  • server - Open the local server to view tree
  • txt - According to the directory structure to generate a txt file
  • img - According to the directory structure to generate an image file
  • page - According to the directory structure to generate a page
  • log - Print the directory structure to the shell, this is default

Dependencies

Install

# globel install
npm install -g ctree

Usage

# 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:

module.exports = {
	path: './src',
	ignore: ['node_modules/', '.git/'],
	limit: 0,
	port: 8080
}

through .js setting

//  .dirrc.js
module.exports = {
	path: '../ctree/',
	ignore: ['node_modules/', '.git/'],
	limit: 0,
	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: 8080) example:

ctree server -d 233
// or
ctree server --port=233

The path of the output (default: ./ctree.*) example:

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:

ctree log -i 3
// or
ctree log --limit=3

Ignore files spanning tree (default: ['node_modules/', '.git/']) example:

//  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']"
1.2.1

9 years ago

1.2.0

9 years ago

1.1.9

10 years ago

1.1.8

10 years ago

1.1.7

10 years ago

1.1.6

10 years ago

1.1.5

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.9

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago