0.1.3 • Published 2 years ago

file-mkdir v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

License

MIT

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago