UNPKG

6.49 kBMarkdownView Raw
1# Git Auto badger
2
3A 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)
4
5[//]: <> (start placeholder for auto-badger)
6
7
8[![Build Status](https://img.shields.io/travis/technikhil314/auto-badger.svg?style=flat-square&color=%23007a1f)](https://travis-ci.org/technikhil314/auto-badger)
9[![version](https://img.shields.io/npm/v/git-auto-badger.svg?style=flat-square)](https://npmjs.org/git-auto-badger)
10[![package size](https://packagephobia.com/badge?p=git-auto-badger)](https://packagephobia.com/result?p=git-auto-badger)
11[![license](https://img.shields.io/npm/l/git-auto-badger?color=%23007a1f)](https://github.com/technikhil314/auto-badger/blob/master/LICENSE)
12
13[![dependancies](https://img.shields.io/librariesio/release/npm/git-auto-badger?color=%23007a1f)](https://libraries.io/npm/git-auto-badger)
14[![downloads](https://img.shields.io/npm/dm/git-auto-badger)](https://npmcharts.com/compare/git-auto-badger)
15[![all contributors](https://img.shields.io/github/all-contributors/technikhil314/auto-badger)](https://github.com/technikhil314/auto-badger/graphs/contributors)
16[![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)
17[![chat with community](https://img.shields.io/gitter/room/technikhil314/auto-badger?color=%23007a1f)](https://gitter.im/auto-badger)
18
19[![stargazers](https://img.shields.io/github/stars/technikhil314/auto-badger?style=social)](https://github.com/technikhil314/auto-badger/stargazers)
20[![number of forks](https://img.shields.io/github/forks/technikhil314/auto-badger?style=social)](https://github.com/technikhil314/auto-badger/fork)
21[![Follow technikhil314 on twiter](https://img.shields.io/twitter/follow/technikhil314?label=Follow)](https://www.twitter.com/technikhil314)
22
23:clap: & :heart: to [auto badger](https://github.com/technikhil314/auto-badger) for making badgin simple
24
25[//]: <> (end placeholder for auto-badger)
26
27
28
29<br/>
30
31## Announcements
32
33- 18 Oct 2020
34 1. Using find-up to search files. Now you can use this with monorepos too.
35
36## Prerequisites
37
38Node >= 10.x.x
39
40<br/>
41
42## See the demo running here
43
44[![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)
45
46<br/>
47
48## Why
49
50Because 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
51
52![demo](https://img.shields.io/librariesio/release/npm/git-auto-badger?style=flat-square)
53
54<br/>
55
56## How to use
57
58### Install the cli
59
60```
61npm i -g git-auto-badger
62
63or
64
65yarn add -g git-auto-badger
66```
67
68### Add placeholder to add badges
69
70Add following markdown comment where you want the badges to appear
71
72```
73[//]: <> (start placeholder for auto-badger)
74```
75
76### Run the cli
77
78then run following in your project root directory
79
80```
81npx auto-badger
82```
83
84And whoo hoo you are done. All the necessary badges are added to your markdown.
85
86<br/>
87
88## What all things are supported
89
90This cli currently supports following providers from each category
91
921. VCS
93 - [Github](https://www.github.com/) [:heavy_check_mark:]
94 - [Gitlab](https://www.gitlab.com/) [Coming soon]
951. CI/CD
96 - [Travis CI](https://travis-ci.org/) [:heavy_check_mark:]
97 - [Github Actions (first Job)](https://github.com/features/actions) [:heavy_check_mark:]
98 - [Appveyor](https://www.appveyor.com/) [:heavy_check_mark:]
99 - [Circle CI](https://circleci.com/) [:heavy_check_mark:]
1001. Coverage
101 - [Coveralls](https://coveralls.io/) [:heavy_check_mark:]
102 - [CodeCov](https://codecov.io/) [:heavy_check_mark:]
1031. Package Managers
104 - [NPM](https://www.npmjs.com/) [:heavy_check_mark:]
105 - [PyPI](https://pypi.org/) [Coming soon]
1061. License
107 - Github License File [:heavy_check_mark:]
1081. Code of Conduct
109 - Github CoC File [:heavy_check_mark:]
1101. Dependancies
111 - [Libraries.io for NPM](https://libraries.io/) [:heavy_check_mark:]
1121. Package size
113 - [Bundelphobia](https://bundlephobia.com/) [:heavy_check_mark:]
1141. Download Count
115 - [NPM Per month](https://npmcharts.com/) [:heavy_check_mark:]
1161. Social
117 - Github (Repo Stars, Fork) [:heavy_check_mark:]
118 - twitter (Follow user/org) [:heavy_check_mark:]
1191. Chat
120 - [Gitter](https://gitter.im/) [:heavy_check_mark:]
121 - [Spectrum](https://spectrum.chat/) [:heavy_check_mark:]
122 - [Discord](https://discord.com/) [:heavy_check_mark:]
123
124<br/>
125
126### How it works?
127
1281. It looks for different file in your project root directory. To decide what tools are you using. And generates badges based on it.
129
130 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
131 <br/>
132 <br/>
133 or
134 <br/>
135 <br/>
136 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
137
138### Defaults
139
140| Badge Type | Default |
141| ---------- | --------------------------------------------- |
142| Size | Bundle phobia (if browser only package) |
143| Size | package phobia (if node only package e.g cli) |
144
145## If you liked my work, show some :heart: :star: the repo.
146
147Also you can appreciate by
148
149<p>
150 <table style="border-spacing: 5px 10px;">
151 <tr>
152 <td>
153 <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>
154 </td>
155 <td>
156 <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">
157 </td>
158 </tr>
159
160 </table>
161</p>
162
163# Issues/Problems
164
165Please let me know if you are facing any issues [here](https://github.com/technikhil314/auto-badger/issues)
166
167<br/>
168
169# Contributions
170
171Would :heart: to see any contributions.
172
173### How to contribute
174
1751. Fork this repo
1761. `cd auto-badger`
1771. `npm link`
1781. Make changes
1791. `auto-badger`
1801. Check and make sure all badges are generated properly