gen-file-structure
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gen-file-structure

Weekly Downloads

1

Version

0.2.1

License

ISC

Unpacked Size

13.1 kB

Total Files

16

Last publish

Collaborators

  • mortal2019