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[![Build Status](https://img.shields.io/travis/technikhil314/auto-badger.svg?style=flat-square&color=%23007a1f)](https://travis-ci.org/technikhil314/auto-badger)
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 twiter](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 badgin simple
25
26[//]: <> (end placeholder for auto-badger)
27
28## Table of contents
29 * [Announcements](#announcements)
30 * [Prerequisites](#prerequisites)
31 * [Demo](#see-the-demo-running-here)
32 * [Usage](#how-to-use)
33 + [Install the cli](#install-the-cli)
34 + [Add placeholder to add badges](#add-placeholder-to-add-badges)
35 + [Run the cli](#run-the-cli)
36 * [What all things are supported](#what-all-things-are-supported)
37 + [How it works?](#how-it-works-)
38 + [Defaults](#defaults)
39 * [Facing problems](#facing-problems)
40 * [Contributions](#contributions)
41 + [How to contribute](#how-to-contribute)
42
43
44<br/>
45
46## Announcements
47
48- 18 Oct 2020
49 1. Using find-up to search files. Now you can use this with monorepos too.
50
51## Prerequisites
52
53Node >= 10.x.x
54
55<br/>
56
57## See the demo running here
58
59[![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)
60
61<br/>
62
63## Why
64
65Because 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
66
67[![Build Status](https://github.com/technikhil314/angular-components/workflows/build/badge.svg?branch=master)](https://github.com/technikhil314/angular-components/actions)
68
69<br/>
70
71## How to use
72
73### Install the cli
74
75```
76npm i -g git-auto-badger
77
78or
79
80yarn add -g git-auto-badger
81```
82
83### Add placeholder to add badges
84
85Add following markdown comment where you want the badges to appear
86
87```
88[//]: <> (start placeholder for auto-badger)
89```
90
91### Run the cli
92
93then run following in your project root directory
94
95```
96npx auto-badger
97```
98
99And whoo hoo you are done. All the necessary badges are added to your markdown.
100
101<br/>
102
103## What all things are supported
104
105This cli currently supports following providers from each category
106
1071. VCS
108 - [Github](https://www.github.com/) [:heavy_check_mark:]
109 - [Gitlab](https://www.gitlab.com/) [Coming soon]
1101. CI/CD
111 - [Travis CI](https://travis-ci.org/) [:heavy_check_mark:]
112 - [Github Actions (first Job)](https://github.com/features/actions) [:heavy_check_mark:]
113 - [Appveyor](https://www.appveyor.com/) [:heavy_check_mark:]
114 - [Circle CI](https://circleci.com/) [:heavy_check_mark:]
1151. Coverage
116 - [Coveralls](https://coveralls.io/) [:heavy_check_mark:]
117 - [CodeCov](https://codecov.io/) [:heavy_check_mark:]
1181. Package Managers
119 - [NPM](https://www.npmjs.com/) [:heavy_check_mark:]
120 - [PyPI](https://pypi.org/) [Coming soon]
1211. License
122 - Github License File [:heavy_check_mark:]
1231. Code of Conduct
124 - Github CoC File [:heavy_check_mark:]
1251. Dependancies
126 - [Libraries.io for NPM](https://libraries.io/) [:heavy_check_mark:]
1271. Package size
128 - [Bundelphobia](https://bundlephobia.com/) [:heavy_check_mark:]
1291. Download Count
130 - [NPM Per month](https://npmcharts.com/) [:heavy_check_mark:]
1311. Social
132 - Github (Repo Stars, Fork) [:heavy_check_mark:]
133 - twitter (Follow user/org) [:heavy_check_mark:]
1341. Chat
135 - [Gitter](https://gitter.im/) [:heavy_check_mark:]
136 - [Spectrum](https://spectrum.chat/) [:heavy_check_mark:]
137 - [Discord](https://discord.com/) [:heavy_check_mark:]
138
139<br/>
140
141### How it works?
142
1431. It looks for different file in your project root directory. To decide what tools are you using. And generates badges based on it.
144
145 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
146 <br/>
147 <br/>
148 or
149 <br/>
150 <br/>
151 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
152
153### Defaults
154
155| Badge Type | Default |
156| ---------- | --------------------------------------------- |
157| Size | Bundle phobia (if browser only package) |
158| Size | package phobia (if node only package e.g cli) |
159
160## If you liked my work, show some :heart: :star: the repo.
161
162Also you can appreciate by
163
164<p>
165 <table style="border-spacing: 5px 10px;">
166 <tr>
167 <td>
168 <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>
169 </td>
170 <td>
171 <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">
172 </td>
173 </tr>
174
175 </table>
176</p>
177
178# Facing Problems
179
180Please let me know if you are facing any issues [here](https://github.com/technikhil314/auto-badger/issues)
181
182<br/>
183
184# Contributions
185
186Would :heart: to see any contributions.
187
188### How to contribute
189
1901. Fork this repo
1911. `cd auto-badger`
1921. `npm link`
1931. Make changes
1941. `auto-badger`
1951. Check and make sure all badges are generated properly