Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gh-badges

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-badges - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

1

gh-badge.js

@@ -0,1 +1,2 @@

#!/usr/bin/env node
var path = require('path');

@@ -2,0 +3,0 @@ var badge = require(path.join(__dirname, 'badge.js'));

2

package.json
{
"name": "gh-badges",
"version": "0.2.1",
"version": "0.2.2",
"description": "GitHub badges implemented in SVG.",

@@ -5,0 +5,0 @@ "keywords": ["GitHub", "badge", "SVG", "image"],

# GitHub badges in SVG format
[![npm version](http://b.adge.me/npm/v/gh-badges.svg)](https://npmjs.org/package/gh-badges)
![coverage](./coverage.svg)
![coverage](https://rawgithub.com/badges/gh-badges/master/coverage.svg)
Make your own [badges][] (like this one above)!
Make your own badges [here][badges]!
[badges]: <http://b.adge.me>
# Contribute
# Install the API
If you want to add a badge, you only need to modify `default-badges.json`.
```bash
npm install gh-badges
```
```js
var badge = require('gh-badges');
badge({ text: [ "build", "passed" ], colorscheme: "green" },
function(svg) {
// svg is a String… of your badge.
});
```
# Use the CLI
```bash
npm install -g gh-badges
badge build passed :green .png > mybadge.png
# Stored a PNG version of your badge on disk.
```
# Set the Server
```bash
git clone git@github.com:badges/gh-badges
cd gh-badges
npm install
sudo npm start
```
# Format
The format is the following:
```js
/* Unique name of your badge. */
"build-passed": {
{
/* Textual information shown, in order. */
"text": [ "build", "passed" ],
"colorscheme": "green"
/* … Or… */
"colorA": "#555",
"colorB": "#4c1"
}
```
Color schemes are located in `colorscheme.json`. Each scheme has a name and
a [CSS/SVG color][] for the
color used in the first box (for the first piece of text, field `colorA`) and
for the one used in the second box (field `colorB`).
# Defaults
If you want to add a default badge, you only need to modify
`default-badges.json`. The format is the same as that given to the API.
If you want to add a colorscheme, head to `colorscheme.json`. Each scheme has a
name and a [CSS/SVG color][] for the color used in the first box (for the first
piece of text, field `colorA`) and for the one used in the second box (field
`colorB`).
[CSS/SVG color]: http://www.w3.org/TR/SVG/types.html#DataTypeColor

@@ -48,5 +84,7 @@

Because of the usage of the npm module [canvas][canvas-pkg] *you need* to have **cairo** installed.
Because of the usage of the npm module [canvas][canvas-pkg] *you need* to have
**cairo** installed.
For more information check the [wiki][canvas-wiki] of the canvas project with system-specific installation details.
For more information check the [wiki][canvas-wiki] of the canvas project with
system-specific installation details.

@@ -58,3 +96,3 @@ [canvas-pkg]: https://npmjs.org/package/canvas

Once you have installed the [Heroku Toolbelt][]
Once you have installed the [Heroku Toolbelt][]:

@@ -61,0 +99,0 @@ [Heroku Toolbelt]: (https://toolbelt.heroku.com/):

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc