jest-badges-readme
npm i @olavoparno/jest-badges-readme --save-dev
Here is what the above code is Doing:
1. It’s importing the `jestBadges` function from the `jest-badges-readme` package.
2. It’s calling the `jestBadges` function, passing in the `__dirname` variable.
3. It’s saving the return value of the `jestBadges` function to a variable called `badges`.
4. It’s writing the `badges` variable to the `README.md` file.
## How to use
1. Install the package:
“`bash
npm i @olavoparno/jest-badges-readme –save-dev
“`
2. Import the `jestBadges` function from the package:
“`js
import jestBadges from ‘@olavoparno/jest-badges-readme’;
“`
3. Call the `jestBadges` function, passing in the `__dirname` variable:
“`js
const badges = jestBadges(__dirname);
“`
4. Write the return value of the `jestBadges` function to the `README.md` file:
“`js
fs.writeFileSync(path.join(__dirname, ‘README.md’), badges);
“`
## How to run the tests
1. Clone the repository:
“`bash
git clone https://github.com/olavoparno/jest-badges-readme.git
“`
2. Install the dependencies:
“`bash
npm i
“`
3. Run the tests:
“`bash
npm test
“`
## How to contribute
1. Fork the repository.
2. Create a branch for your feature.
3. Add your feature.
4. Add tests for your feature.
5. Run the tests, ensuring they all pass.
6. Submit a pull request.
## License
[MIT](LICENSE)