badge-management

1.0.2 • Public • Published

Badge Management

repository badge

a simple approach to badge management in any project (nodejs required)

Badges

version badge

  • Styles: flat, classic (gradient)
  • Hooks into single readme (no requirement for a "template" readme file)

Install NPM

npm install --save-dev badge-management

How to setup

  1. Include project to your package.json via npm install --save-dev badge-management

  2. Add to your package.json

    {
      "badges": {
        "injectors": {
          "README.md": [
            {
              "definitions": [
                "repository",
                "version"
              ]
            }
          ]
        },
        "definitions": {
          "version": {
            "type": "package_version"
          },
          "repository": {
            "type": "package_repository_url"
          }
        }
      }
    }
    • injectors are not required and can be removed.
    • definitions requires at least 1 entry.
  3. If injectors is not defined skip to step 4.

    • In each file your injecting add these tags where you want the render to happen.
    [comment_badge_management_start]: <hidden__do_not_remove>
    [comment_badge_management_end]: <hidden__do_not_remove>
  4. Create a script wherever you would like with the following contents (for example we picked ./scripts/badges.js.

    require("badge-management").run();
  5. Execute that script with node scripts/badges.js to update your badge files and injectors (if defined).

more about configuration options can be found here

Package Sidebar

Install

npm i badge-management

Weekly Downloads

9

Version

1.0.2

License

MIT

Unpacked Size

26.6 kB

Total Files

20

Last publish

Collaborators

  • classynode