0.2.1 • Published 7 months ago

gen-file-structure v0.2.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

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
                 
0.2.1

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago