UNPKG

8.05 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[![Build Status](https://img.shields.io/github/workflow/status/technikhil314/auto-badger/publish?style=flat-square&color=%23007a1f)](https://github.com/technikhil314/auto-badger/actions)
10[![version](https://img.shields.io/npm/v/git-auto-badger.svg?style=flat-square)](https://npmjs.org/git-auto-badger)
11[![package size](https://packagephobia.com/badge?p=git-auto-badger)](https://packagephobia.com/result?p=git-auto-badger)
12[![license](https://img.shields.io/npm/l/git-auto-badger?color=%23007a1f&style=flat-square)](https://github.com/technikhil314/auto-badger/blob/master/LICENSE)
13
14[![dependancies](https://img.shields.io/librariesio/release/npm/git-auto-badger?color=%23007a1f&style=flat-square)](https://libraries.io/npm/git-auto-badger)
15[![downloads](https://img.shields.io/npm/dm/git-auto-badger?style=flat-square&color=%23007a1f)](https://npmcharts.com/compare/git-auto-badger)
16[![all contributors](https://img.shields.io/github/all-contributors/technikhil314/auto-badger?style=flat-square)](https://github.com/technikhil314/auto-badger/graphs/contributors)
17[![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)
18[![chat with community](https://img.shields.io/gitter/room/technikhil314/auto-badger?color=%23007a1f&style=flat-square)](https://gitter.im/auto-badger)
19
20[![stargazers](https://img.shields.io/github/stars/technikhil314/auto-badger?style=social)](https://github.com/technikhil314/auto-badger/stargazers)
21[![number of forks](https://img.shields.io/github/forks/technikhil314/auto-badger?style=social)](https://github.com/technikhil314/auto-badger/fork)
22[![Follow technikhil314 on twitter](https://img.shields.io/twitter/follow/technikhil314?label=Follow)](https://www.twitter.com/technikhil314)
23
24###### :clap: & :heart: to [auto badger](https://github.com/technikhil314/auto-badger) for making badging simple
25
26[//]: <> (end placeholder for auto-badger)
27
28## Table of contents
29
30- [Git Auto badger](#git-auto-badger)
31 - [Add badges to your project in 2 seconds](#add-badges-to-your-project-in-2-seconds)
32 - [:clap: & :heart: to auto badger for making badging simple](#clap--heart-to-auto-badger-for-making-badging-simple)
33 - [Table of contents](#table-of-contents)
34 - [Announcements](#announcements)
35 - [Prerequisites](#prerequisites)
36 - [See the demo running here](#see-the-demo-running-here)
37 - [Why](#why)
38 - [How to use](#how-to-use)
39 - [Install the cli](#install-the-cli)
40 - [Add placeholder to your markdown](#add-placeholder-to-your-markdown)
41 - [Run the cli](#run-the-cli)
42 - [What all things are supported](#what-all-things-are-supported)
43 - [How it works?](#how-it-works)
44 - [Defaults](#defaults)
45 - [If you liked my work, show some :heart: :star: the repo.](#if-you-liked-my-work-show-some-heart-star-the-repo)
46- [Facing Problems](#facing-problems)
47- [Contributions](#contributions)
48 - [How to contribute](#how-to-contribute)
49
50<br/>
51
52## Announcements
53
54- 06 Mar 2021
55 1. Added -e/--exclude option to opt out of some badges
56- 08 Nov 2020
57 1. Added -p option for passing custom path to your markdown
58- 01 Nov 2020
59 1. Using meow and update notifier
60 2. Removing accidentally added npm package. A total blunder :(
61- 18 Oct 2020
62 1. Using find-up to search files. Now you can use this with monorepos too.
63
64## Prerequisites
65
66Node >= 10.x.x
67
68<br/>
69
70## See the demo running here
71
72[![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)
73
74<br/>
75
76## Why
77
781. Copy pasting / creating badges on [shields.io](https://shields.io/) such a robotic job.
792. Some of the default provided badges lacks of some of the accessibility constraint. White on green does not meet the required contrast ratio. See the badge below for example it will be difficult for low vision people to read it
80
81[![Build Status](https://github.com/technikhil314/angular-components/workflows/build/badge.svg?branch=master)](https://github.com/technikhil314/angular-components/actions)
82
83<br/>
84
85## How to use
86
87### Install the cli
88
89```
90npm i -g git-auto-badger
91
92or
93
94yarn add -g git-auto-badger
95```
96
97### Add placeholder to your markdown
98
99Add following markdown comment where you want the badges to appear
100
101```
102[//]: <> (start placeholder for auto-badger)
103```
104
105### Run the cli
106
107then run following in your project root directory
108
109```
110npx auto-badger
111```
112
113And whoo hoo you are done. All the necessary badges are added to your markdown.
114
115<br/>
116
117## What all things are supported
118
119This cli currently supports following providers from each category
120
1211. VCS
122 - [Github](https://www.github.com/) [:heavy_check_mark:]
123 - [Gitlab](https://www.gitlab.com/) [Coming soon]
1241. CI/CD
125 - [Travis CI](https://travis-ci.org/) [:heavy_check_mark:]
126 - [Github Actions (first Job)](https://github.com/features/actions) [:heavy_check_mark:]
127 - [Appveyor](https://www.appveyor.com/) [:heavy_check_mark:]
128 - [Circle CI](https://circleci.com/) [:heavy_check_mark:]
1291. Coverage
130 - [Coveralls](https://coveralls.io/) [:heavy_check_mark:]
131 - [CodeCov](https://codecov.io/) [:heavy_check_mark:]
1321. Package Managers
133 - [NPM](https://www.npmjs.com/) [:heavy_check_mark:]
134 - [PyPI](https://pypi.org/) [Coming soon]
1351. License
136 - Github License File [:heavy_check_mark:]
1371. Code of Conduct
138 - Github CoC File [:heavy_check_mark:]
1391. Dependancies
140 - [Libraries.io for NPM](https://libraries.io/) [:heavy_check_mark:]
1411. Package size
142 - [Bundelphobia](https://bundlephobia.com/) [:heavy_check_mark:]
1431. Download Count
144 - [NPM Per month](https://npmcharts.com/) [:heavy_check_mark:]
1451. Social
146 - Github (Repo Stars, Fork) [:heavy_check_mark:]
147 - twitter (Follow user/org) [:heavy_check_mark:]
1481. Chat
149 - [Gitter](https://gitter.im/) [:heavy_check_mark:]
150 - [Spectrum](https://spectrum.chat/) [:heavy_check_mark:]
151 - [Discord](https://discord.com/) [:heavy_check_mark:]
152
153<br/>
154
155### How it works?
156
1571. It looks for different file in your project root directory. To decide what tools are you using. And generates badges based on it.
158
159 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
160 <br/>
161 <br/>
162 or
163 <br/>
164 <br/>
165 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
166
167### Defaults
168
169| Badge Type | Default |
170| ---------- | --------------------------------------------- |
171| Size | Bundle phobia (if browser only package) |
172| Size | package phobia (if node only package e.g cli) |
173
174## If you liked my work, show some :heart: :star: the repo.
175
176Also you can appreciate by
177
178<p>
179 <table style="border-spacing: 5px 10px;">
180 <tr>
181 <td>
182 <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>
183 </td>
184 <td>
185 <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">
186 </td>
187 </tr>
188
189 </table>
190</p>
191
192# Facing Problems
193
194Please let me know if you are facing any issues [here](https://github.com/technikhil314/auto-badger/issues)
195
196<br/>
197
198# Contributions
199
200Would :heart: to see any contributions.
201
202### How to contribute
203
2041. Fork this repo
2051. `cd auto-badger`
2061. `npm link`
2071. Make changes
2081. `auto-badger`
2091. Check and make sure all badges are generated properly