Skip to content

πŸ“¦πŸ“ Personal generator to simply create cool and efficients README.md

License

Notifications You must be signed in to change notification settings

audreylopes/readme-generator

Β 
Β 

Repository files navigation

🚩 @IBBATTA/README GENERATOR

Version Npm downloads Repository size Opened issues License: MIT

Twitter follower

This project was born mainly to satisfy my desire for knowledge and to simplify my workflow. Being a curious (and also lazy) developer I have always wondered how to avoid wasting my working time to write README.md files who fits perfectly project by project and that's why I wrote a tool to help me simplify and speed up these processes.

Example gif


πŸ“‹ User usage

Install globally npm i -g @ibbatta/readme-generator.
Install locally npm i --save-dev @ibbatta/readme-generator.
Just run readme-generator (or npx readme-generator) at the root of your project and answer questions.

You can add few options:

Option Description Default
-V, --version output the version number
-h, --help output usage information
-e, --entry specify the entry file package.json
-o, --output specify the output file README.md
-t, --template specify the path for you own README template internal default template
-d, --debug log output readme data false

The tools will look for the name, version, description, respository, author, engines, dependencies and contributors data inside you package.json and then will generate the README.md file based on that informations.

Due to this tool was create mainly for node based project it will take the package.json by default.
If you project doesn't have a package.json, you can specify another json file.

NOTE: To generate a complete README.md, be sure that the structure of your package.json (or you entry file) looks like this:

{
    "name": "PROJECT NAME",
    "version": "PROJECT VERSION",
    "description": "LONG PROJECT DESCRIPTION",
    "repository": {
        "url": "REPOSITORY URL"
    },
    "author": {
        "name": "AUTHOR FULL NAME",
        "email": "AUTHOR EMAIL ADDRESS",
        "url": "AUTHOR URL",
        "social": {
            "github": "...",
            "twitter": "...",
            "ADD MORE SOCIAL IF YOU WANT": "..."
        }
    },
    "contributors": [{
        "name": "CONTRIBUTOR FULL NAME",
        "url": "CONTRIBUTOR URL",
        "reason": "THE REASON WHY YOU HAVE ADDED THIS CONTRIBUTOR AND/OR HIS HELP TO THE PROJECT"
    }],
    "engines": {
       ...
    },
    "dependencies": {
        ...
    }
}

If no entry file is specified, and package.json is missing, the tool will ask you some questions.

I've added two custom fields inside the package.json:

  • SOCIAL (inside author)
  • REASON (inside each contributor)

This allow the tool to create a better README with more cool informations.

Here is a generated README example.


πŸ”§ Developer usage

Set up project

Before cloning the repo be sure you have installed:

  • NODE (version >= 8.9.x)
  • YARN (version >= 1.9.x)
  • NPM (version >= 6.3.x)

Then:

  • Choose a folder project in your system and switch in cd [folder path]
  • Clone the repo in your folder git clone https://github.com/ibbatta/readme-generator.git

Installation

First of all enter in the project folder and run nvm use to have the right node version for the project, then run yarn install to install all the dependencies.


Start the project

It will run the cli of the project locally

npm start
# or
yarn start

Build the project for production

It will create a folder /lib and compile the es6 / es7 js syntax

npm build
#or
yarn build

You can add the --watch flag if you want keep watching changes for test files.

Run the tests

npm test
#or
yarn test

You can add the --watch flag if you want keep watching changes for test files.


Editor setup

To keep consistency to the style of resources, I decided to stick to some shared rules that have to be applied to every project using some editors plugins. Plese be sure to disable / remove any other js/jsx linters or custom configurations.

Eslint

I have chose to use Eslint to check on Javascript / React [.js / .jsx] syntax. It works including a .eslintrc file in the root directory and making sure your editor has the necessary plugin.

Auto correction on save

I have chose to use js-beautify as a beautifier also for HTML and CSS. It works including a .jsbeautifyrc file in the root directory and making sure your editor has the necessary plugin.

Basic Editor Configuration

I have chose to use EditorConfig to share the basic configuration like indentation and charset. It works including an .editorconfig file in the root directory and making sure your editor has the necessary plugin.

Prettier

I have chose to use Prettier to ensure the codebase with a consistent style. It works including a .prettierrc file in the root directory and making sure your editor has the necessary plugin.


🀝 Contributing

Contributions, issues and feature requests are welcome.
Feel free to check issues page if you want to contribute and follow these simple steps:

  • Fork it!
  • Create your feature (or fix) branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

πŸ’’ Troubleshootings

This is just a personal project created for study / demonstration purpose and to simplify my working life, it may or may not be a good fit for your project(s).


❀️ Show your support

Please ⭐ this repository if you like it or this project helped you!
Feel free to open issues or submit pull-requests to help me improving my work.

Patron logo

πŸ€– Author

Maurizio Battaghini

GitHub @ibbatta Β Β·Β  Twitter @battago


Copyright Β© 2019 Maurizio Battaghini.
This project is covered by MIT license.

About

πŸ“¦πŸ“ Personal generator to simply create cool and efficients README.md

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.4%
  • HTML 13.6%