Skip to content

jpb06/readme-package-icons

Repository files navigation

readme-package-icons

Open in Visual Studio Code npm bundle size Github workflow Quality Gate Status Maintainability Rating Security Rating Reliability Rating Coverage Lines of Code Technical Debt Code Smells Bugs Vulnerabilities Duplicated Lines (%) Last commit

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:

npm install -g readme-package-icons

Then we can use it by using the -p option:

npm run generateReadmeIcons -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!

About

Displaying dependencies as icons in repositories readme

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published