https://github.com/jpb06/readme-package-icons
Displaying dependencies as icons in repositories readme
https://github.com/jpb06/readme-package-icons
readme
Last synced: about 1 year ago
JSON representation
Displaying dependencies as icons in repositories readme
- Host: GitHub
- URL: https://github.com/jpb06/readme-package-icons
- Owner: jpb06
- License: mit
- Created: 2022-07-07T18:52:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-26T19:34:51.000Z (about 1 year ago)
- Last Synced: 2025-04-26T20:26:13.662Z (about 1 year ago)
- Topics: readme
- Language: TypeScript
- Homepage:
- Size: 1.34 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# readme-package-icons
[](https://github.dev/jpb06/readme-package-icons)


[](https://sonarcloud.io/summary/new_code?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/dashboard?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/dashboard?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/dashboard?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/dashboard?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/summary/new_code?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/summary/new_code?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/dashboard?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/summary/new_code?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/summary/new_code?id=jpb06_readme-package-icons)
[](https://sonarcloud.io/dashboard?id=jpb06_readme-package-icons)

Generating a list of icons from dependencies.
Blabla
```
Our 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:
```json
{
"scripts": {
"readme-icons": "generateReadmeIcons"
}
}
```
##### 🍥 Globally
We can also install the package globally:
```bash
npm install -g readme-package-icons
```
Then we can use it by using the `-p` option:
```bash
npm run generateReadmeIcons -p /Users/jpb06/repos/myRepo
```
You can also use the esm version:
```bash
npm run generateReadmeIconsEsm -p /Users/jpb06/repos/myRepo
```
#### 🌀 node
This package exposes the function as well:
```typescript
import { generateReadmeIcons } from 'readme-package-icons';
(async (): Promise => {
const path = './path/to/my/repo';
const iconsHeight = 50;
const iconsAddedToReadmeCount = await generateReadmeIcons({
path,
iconsHeight,
});
})();
```
## ⚡ Thanks
This module uses some icons from [devicons](https://github.com/devicons/devicon/). Thanks for their great work!