UNPKG

7.36 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)](https://github.com/technikhil314/auto-badger/blob/master/LICENSE)
13
14[![dependancies](https://img.shields.io/librariesio/release/npm/git-auto-badger?color=%23007a1f)](https://libraries.io/npm/git-auto-badger)
15[![downloads](https://img.shields.io/npm/dm/git-auto-badger)](https://npmcharts.com/compare/git-auto-badger)
16[![all contributors](https://img.shields.io/github/all-contributors/technikhil314/auto-badger)](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)](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- [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<br/>
45
46## Announcements
47- 08 Nov 2020
48 1. Added -p option for passing custom path to your markdown
49- 01 Nov 2020
50 1. Using meow and update notifier
51 2. Removing accidentally added npm package. A total blunder :(
52- 18 Oct 2020
53 1. Using find-up to search files. Now you can use this with monorepos too.
54
55## Prerequisites
56
57Node >= 10.x.x
58
59<br/>
60
61## See the demo running here
62
63[![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)
64
65<br/>
66
67## Why
68
69Because 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
70
71[![Build Status](https://github.com/technikhil314/angular-components/workflows/build/badge.svg?branch=master)](https://github.com/technikhil314/angular-components/actions)
72
73<br/>
74
75## How to use
76
77### Install the cli
78
79```
80npm i -g git-auto-badger
81
82or
83
84yarn add -g git-auto-badger
85```
86
87### Add placeholder to add badges
88
89Add following markdown comment where you want the badges to appear
90
91```
92[//]: <> (start placeholder for auto-badger)
93```
94
95### Run the cli
96
97then run following in your project root directory
98
99```
100npx auto-badger
101```
102
103And whoo hoo you are done. All the necessary badges are added to your markdown.
104
105<br/>
106
107## What all things are supported
108
109This cli currently supports following providers from each category
110
1111. VCS
112 - [Github](https://www.github.com/) [:heavy_check_mark:]
113 - [Gitlab](https://www.gitlab.com/) [Coming soon]
1141. CI/CD
115 - [Travis CI](https://travis-ci.org/) [:heavy_check_mark:]
116 - [Github Actions (first Job)](https://github.com/features/actions) [:heavy_check_mark:]
117 - [Appveyor](https://www.appveyor.com/) [:heavy_check_mark:]
118 - [Circle CI](https://circleci.com/) [:heavy_check_mark:]
1191. Coverage
120 - [Coveralls](https://coveralls.io/) [:heavy_check_mark:]
121 - [CodeCov](https://codecov.io/) [:heavy_check_mark:]
1221. Package Managers
123 - [NPM](https://www.npmjs.com/) [:heavy_check_mark:]
124 - [PyPI](https://pypi.org/) [Coming soon]
1251. License
126 - Github License File [:heavy_check_mark:]
1271. Code of Conduct
128 - Github CoC File [:heavy_check_mark:]
1291. Dependancies
130 - [Libraries.io for NPM](https://libraries.io/) [:heavy_check_mark:]
1311. Package size
132 - [Bundelphobia](https://bundlephobia.com/) [:heavy_check_mark:]
1331. Download Count
134 - [NPM Per month](https://npmcharts.com/) [:heavy_check_mark:]
1351. Social
136 - Github (Repo Stars, Fork) [:heavy_check_mark:]
137 - twitter (Follow user/org) [:heavy_check_mark:]
1381. Chat
139 - [Gitter](https://gitter.im/) [:heavy_check_mark:]
140 - [Spectrum](https://spectrum.chat/) [:heavy_check_mark:]
141 - [Discord](https://discord.com/) [:heavy_check_mark:]
142
143<br/>
144
145### How it works?
146
1471. It looks for different file in your project root directory. To decide what tools are you using. And generates badges based on it.
148
149 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
150 <br/>
151 <br/>
152 or
153 <br/>
154 <br/>
155 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
156
157### Defaults
158
159| Badge Type | Default |
160| ---------- | --------------------------------------------- |
161| Size | Bundle phobia (if browser only package) |
162| Size | package phobia (if node only package e.g cli) |
163
164## If you liked my work, show some :heart: :star: the repo.
165
166Also you can appreciate by
167
168<p>
169 <table style="border-spacing: 5px 10px;">
170 <tr>
171 <td>
172 <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>
173 </td>
174 <td>
175 <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">
176 </td>
177 </tr>
178
179 </table>
180</p>
181
182# Facing Problems
183
184Please let me know if you are facing any issues [here](https://github.com/technikhil314/auto-badger/issues)
185
186<br/>
187
188# Contributions
189
190Would :heart: to see any contributions.
191
192### How to contribute
193
1941. Fork this repo
1951. `cd auto-badger`
1961. `npm link`
1971. Make changes
1981. `auto-badger`
1991. Check and make sure all badges are generated properly