2.0.0 • Published 2 years ago

project-directory-tree v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Generate a directory structure for the project

usage

npm i project-directory-tree -D

or

npm i project-directory-tree -g
  • 全局安装

控制台执行:pdt

pdt
  • 局部安装
// package.json
"scripts": {
    "tree": "pdt"
}
npm run tree

在项目的根目录下将会生成一个 projectTree.txt。可能会是下面这个样子。

// projectTree.txt demo

options

项目根目录下新建pdt.config.js

// pdt.config.js
module.exports = {
  maxDepth: 1,
}

options 可以是下面的属性:

propertytypedefaultdescription
ignoreFilesstring[]'node_modules','.git'要忽略的目录或文件
maxDepthnumber3生成树结构的最大深度
defaultPathstringprocess.cwd()项目的路径
ROOT_PATHstringpath.resolve(projectTree.txt)保存projectTree.txt的路径
2.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago