Extended usage of build-status.js tomore services (#2763)

* Extended usage of build-status.js

* Removed remaining status arguments
This commit is contained in:
Pierre-Yves B
2019-01-15 20:27:18 +00:00
committed by GitHub
parent 22e8510fc7
commit 55ce947a35
18 changed files with 113 additions and 164 deletions

View File

@@ -214,6 +214,7 @@ Description of the code:
1. As with the first example, we declare strict mode at the start of each file.
2. Our badge will query a JSON API so we will extend `BaseJsonService` instead of `BaseService`. This contains some helpers to reduce the need for boilerplate when calling a JSON API.
3. In this case we are making a version badge, which is a common pattern. Instead of directly returning an object in this badge we will use a helper function to format our data consistently. There are a variety of helper functions to help with common tasks in `/lib`. Some useful generic helpers can be found in:
* [build-status.js](https://github.com/badges/shields/blob/master/lib/build-status.js)
* [color-formatters.js](https://github.com/badges/shields/blob/master/lib/color-formatters.js)
* [licenses.js](https://github.com/badges/shields/blob/master/lib/licenses.js)
* [text-formatters.js](https://github.com/badges/shields/blob/master/lib/text-formatters.js)