file-mkdir

0.1.3 • Public • Published

Dir-Tree

English | 简体中文

It is used to generate the project directory tree, and supports markdown and txt file formats.


Usage

First you need to install it:

npm i -D file-mkdir

Tree files can be generated by directly calling the interface, and the md type file is exported by default.

# generateDirectory has default parameters

# generateDirectory(
#   projectPath = __dirname,
#   outputPath = path.join(projectPath, "MD.md"),
#   ignore = ["node_modules", ".git", "dist", ".vscode", ".github"]
# )

# So u can just call it

const generateDirectory = require("file-mkdir");

generateDirectory();

Of course, you can customize the configuration parameters.


const path = require("path");
const generateDirectory = require("file-mkdir");

# Where do you want to start traversing the file
const projectPath = "E://picture";

# markdown
const fileName = "MD.md";
# OR txt
const fileName = "MD.txt";

# Where do you generate.md files
const outputPath = path.join(projectPath, fileName);
const ignore = ["node_modules", ".git"];

generateDirectory(projectPath, outputPath, ignore);

Feature

Dir-Tree

License

MIT

Package Sidebar

Install

npm i file-mkdir

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

3.46 MB

Total Files

8

Last publish

Collaborators

  • inblossoms