A lightweight program that generates a README.md file for the project's directory structure based on a config.
.
├── src
│ ├── config.ts # Project Structure Config
│ ├── index.ts # Project Entry
│ └── README.md # Generated README
├── .gitignore # Git Ignore
├── package.json # Project Dependencies
└── README.md # Project README
- Clone the repository with
git clone git@github.com:laub1199/readme-project-structure-generator.git
- Run
npm install
to install dependencies - Edit the
src/config.ts
file to your liking - Run
npm run gen
to generate the README.md file - Output will be in
src/README.md
The src/config.ts
file contains the configuration for the project structure, edit the projectStructure
variable to your liking. The projectStructure
variable is an array of objects, each object represents a directory.
The projectStructure
variable is in a key-value pair format, where the key is the directory name while the value can be either a string or a object.
For example, if the value is a string, the string will be the directory's description.
const projectStructuer = {
'src': 'Source Code',
'dist': 'Distribution Code',
'node_modules': '',
'...': '',
}
// The above will generate the following:
// .
// ├── src # Source Code
// ├── dist # Distribution Code
// ├── node_modules
// └── ...
If the value is an object, the object will contain the directory's description and the directory's sub-directories.
const projectStructuer = {
'src': {
'index.ts': 'Project Entry',
'subDirectories': {
'config': 'Configuration Files',
'index.ts': 'Project Entry'
}
}
}
// The above will generate the following:
// .
// └── src
// ├── index.ts # Project Entry
// └── subDirectories
// ├── config # Configuration Files
// └── index.ts # Project Entry
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.