Skip to content

Mortal120/gen-file-structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gen-file-structure

generate your file structure

Getting Started

  1. add your project
pnpm install gen-file-structure
  1. generate your file structure
const gen=require('gen-file-structure')
gen({
  rootPath: path.resolve(__dirname,'../'),
  out: "./example.md",  
})
  1. specify ignored files or folders
    By default, node_ modules and .git folders will be ignored.
const gen=require('gen-file-structure')
gen({
  rootPath: path.resolve(__dirname,'../'),
  out: "./example.md", 
  excludes:['package.lock.json',"node_modules",'.git'] 
})
  1. Whether to append it to the Markdown document
const gen=require('gen-file-structure')
gen({
  rootPath: path.resolve(__dirname,'../'),
  out: "./example.md", 
  excludes:['package.lock.json',"node_modules",'.git'], 
  append: true
})

command line

  1. Generate file structure in the current directory, the default file name is structure.md
npx gen-file
  1. Specify the generated root directory and output directory
npx gen-file -r=./src -o=./myFile.md

examples

excute npx gen-file -r=./node_modules/jest

├──bin
│  ├──jest.js
├──build
│  ├──index.d.ts
│  └──index.js
├──LICENSE
├──README.md
└──package.json

About

generate file structure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published