UNPKG

7.17 kBMarkdownView Raw
1# Git Auto badger
2
3### Add badges to your project in 2 seconds
4
5A npm cli tool that reads your packagejson/project metadata and git config and connects your readme with multiple badge providers (shields.io, badgen.net etc)
6
7[//]: <> (start placeholder for auto-badger)
8
9
10[![Build Status](https://img.shields.io/travis/technikhil314/auto-badger.svg?style=flat-square&color=%23007a1f)](https://travis-ci.org/technikhil314/auto-badger)
11[![version](https://img.shields.io/npm/v/git-auto-badger.svg?style=flat-square)](https://npmjs.org/git-auto-badger)
12[![package size](https://packagephobia.com/badge?p=git-auto-badger)](https://packagephobia.com/result?p=git-auto-badger)
13[![license](https://img.shields.io/npm/l/git-auto-badger?color=%23007a1f)](https://github.com/technikhil314/auto-badger/blob/master/LICENSE)
14
15[![dependancies](https://img.shields.io/librariesio/release/npm/git-auto-badger?color=%23007a1f)](https://libraries.io/npm/git-auto-badger)
16[![downloads](https://img.shields.io/npm/dm/git-auto-badger)](https://npmcharts.com/compare/git-auto-badger)
17[![all contributors](https://img.shields.io/github/all-contributors/technikhil314/auto-badger)](https://github.com/technikhil314/auto-badger/graphs/contributors)
18[![code of conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square)](https://github.com/technikhil314/auto-badger/blob/master/CODE_OF_CONDUCT.md)
19[![chat with community](https://img.shields.io/gitter/room/technikhil314/auto-badger?color=%23007a1f)](https://gitter.im/auto-badger)
20
21[![stargazers](https://img.shields.io/github/stars/technikhil314/auto-badger?style=social)](https://github.com/technikhil314/auto-badger/stargazers)
22[![number of forks](https://img.shields.io/github/forks/technikhil314/auto-badger?style=social)](https://github.com/technikhil314/auto-badger/fork)
23[![Follow technikhil314 on twiter](https://img.shields.io/twitter/follow/technikhil314?label=Follow)](https://www.twitter.com/technikhil314)
24
25:clap: & :heart: to [auto badger](https://github.com/technikhil314/auto-badger) for making badging simple
26
27[//]: <> (end placeholder for auto-badger)
28
29## Table of contents
30 * [Announcements](#announcements)
31 * [Prerequisites](#prerequisites)
32 * [Demo](#see-the-demo-running-here)
33 * [Usage](#how-to-use)
34 + [Install the cli](#install-the-cli)
35 + [Add placeholder to add badges](#add-placeholder-to-add-badges)
36 + [Run the cli](#run-the-cli)
37 * [What all things are supported](#what-all-things-are-supported)
38 + [How it works?](#how-it-works-)
39 + [Defaults](#defaults)
40 * [Facing problems](#facing-problems)
41 * [Contributions](#contributions)
42 + [How to contribute](#how-to-contribute)
43
44
45<br/>
46
47## Announcements
48
49- 18 Oct 2020
50 1. Using find-up to search files. Now you can use this with monorepos too.
51
52## Prerequisites
53
54Node >= 10.x.x
55
56<br/>
57
58## See the demo running here
59
60[![demo](https://raw.githubusercontent.com/technikhil314/my-static-assets/master/terminal-casts/auto-badger.svg)](https://raw.githubusercontent.com/technikhil314/my-static-assets/master/terminal-casts/auto-badger.svg)
61
62<br/>
63
64## Why
65
66Because why not? I did not find any such tool out there to minimise efforts of such a robotic job. Plus some of the default provided badges lack of accessibility constrint. White on green does not meet any contrast ratio. See the badge below for example it will be difficult for low vision people to read it
67
68[![Build Status](https://github.com/technikhil314/angular-components/workflows/build/badge.svg?branch=master)](https://github.com/technikhil314/angular-components/actions)
69
70<br/>
71
72## How to use
73
74### Install the cli
75
76```
77npm i -g git-auto-badger
78
79or
80
81yarn add -g git-auto-badger
82```
83
84### Add placeholder to add badges
85
86Add following markdown comment where you want the badges to appear
87
88```
89[//]: <> (start placeholder for auto-badger)
90```
91
92### Run the cli
93
94then run following in your project root directory
95
96```
97npx auto-badger
98```
99
100And whoo hoo you are done. All the necessary badges are added to your markdown.
101
102<br/>
103
104## What all things are supported
105
106This cli currently supports following providers from each category
107
1081. VCS
109 - [Github](https://www.github.com/) [:heavy_check_mark:]
110 - [Gitlab](https://www.gitlab.com/) [Coming soon]
1111. CI/CD
112 - [Travis CI](https://travis-ci.org/) [:heavy_check_mark:]
113 - [Github Actions (first Job)](https://github.com/features/actions) [:heavy_check_mark:]
114 - [Appveyor](https://www.appveyor.com/) [:heavy_check_mark:]
115 - [Circle CI](https://circleci.com/) [:heavy_check_mark:]
1161. Coverage
117 - [Coveralls](https://coveralls.io/) [:heavy_check_mark:]
118 - [CodeCov](https://codecov.io/) [:heavy_check_mark:]
1191. Package Managers
120 - [NPM](https://www.npmjs.com/) [:heavy_check_mark:]
121 - [PyPI](https://pypi.org/) [Coming soon]
1221. License
123 - Github License File [:heavy_check_mark:]
1241. Code of Conduct
125 - Github CoC File [:heavy_check_mark:]
1261. Dependancies
127 - [Libraries.io for NPM](https://libraries.io/) [:heavy_check_mark:]
1281. Package size
129 - [Bundelphobia](https://bundlephobia.com/) [:heavy_check_mark:]
1301. Download Count
131 - [NPM Per month](https://npmcharts.com/) [:heavy_check_mark:]
1321. Social
133 - Github (Repo Stars, Fork) [:heavy_check_mark:]
134 - twitter (Follow user/org) [:heavy_check_mark:]
1351. Chat
136 - [Gitter](https://gitter.im/) [:heavy_check_mark:]
137 - [Spectrum](https://spectrum.chat/) [:heavy_check_mark:]
138 - [Discord](https://discord.com/) [:heavy_check_mark:]
139
140<br/>
141
142### How it works?
143
1441. It looks for different file in your project root directory. To decide what tools are you using. And generates badges based on it.
145
146 e.g. If you have .travis.yml then it assumes you are using travis for CI/CD and it creates a dynamic badge for travis latest build status
147 <br/>
148 <br/>
149 or
150 <br/>
151 <br/>
152 if you have appveyor.yml then it assumes you are using appveyor for CI/CD and it creates a dynamic badge for appveyor latest build status
153
154### Defaults
155
156| Badge Type | Default |
157| ---------- | --------------------------------------------- |
158| Size | Bundle phobia (if browser only package) |
159| Size | package phobia (if node only package e.g cli) |
160
161## If you liked my work, show some :heart: :star: the repo.
162
163Also you can appreciate by
164
165<p>
166 <table style="border-spacing: 5px 10px;">
167 <tr>
168 <td>
169 <a href="https://www.buymeacoffee.com/technikhil314"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" style="max-width:90%;" width="180"></a>
170 </td>
171 <td>
172 <a href="https://paypal.me/technikhil314"><img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-200px.png" alt="PayPal Logo" style="max-width:90%;" width="180">
173 </td>
174 </tr>
175
176 </table>
177</p>
178
179# Facing Problems
180
181Please let me know if you are facing any issues [here](https://github.com/technikhil314/auto-badger/issues)
182
183<br/>
184
185# Contributions
186
187Would :heart: to see any contributions.
188
189### How to contribute
190
1911. Fork this repo
1921. `cd auto-badger`
1931. `npm link`
1941. Make changes
1951. `auto-badger`
1961. Check and make sure all badges are generated properly