UNPKG

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