badge-management
v1.0.2
Published
a simple approach to badge management in any project
Downloads
1
Maintainers
Readme
Badge Management
a simple approach to badge management in any project (nodejs required)
Badges
- 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
Include project to your
package.json
vianpm install --save-dev badge-management
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.
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>
Create a script wherever you would like with the following contents (for example we picked
./scripts/badges.js
.require("badge-management").run();
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