readme-package-icons
v1.2.2
Published
[](https://github.dev/jpb06/readme-package-icons) . It will then generate html code that will be inserted between two placeholder tags in README.md.
🌀 Amending readme
The first step is to add placeholder tags into README.md:
# my-package
<!-- readme-package-icons start -->
<!-- readme-package-icons end -->
BlablaOur icons list will be inserted between these two tags.
🌀 Cli
One way to use this package is to use its executable. The generateReadmeIcons function takes two optional arguments:
| name | description | Example | Default | | ---- | -------------------- | -------- | ------- | | p | The path to the repo | ./myRepo | . | | h | Height of the icons | 100 | 50 |
🍥 Within a package
We could add a script to our package.json for example:
{
"scripts": {
"readme-icons": "generateReadmeIcons"
}
}🍥 Globally
We can also install the package globally:
npm install -g readme-package-iconsThen we can use it by using the -p option:
npm run generateReadmeIcons -p /Users/jpb06/repos/myRepoYou can also use the esm version:
npm run generateReadmeIconsEsm -p /Users/jpb06/repos/myRepo🌀 node
This package exposes the function as well:
import { generateReadmeIcons } from 'readme-package-icons';
(async (): Promise<void> => {
const path = './path/to/my/repo';
const iconsHeight = 50;
const iconsAddedToReadmeCount = await generateReadmeIcons({
path,
iconsHeight,
});
})();⚡ Thanks
This module uses some icons from devicons. Thanks for their great work!
