0.1.3 • Published 10 months ago

file-mkdir v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago