detect-readme-badges
Advanced tools
Comparing version 1.0.0 to 1.1.0
'use strict'; | ||
// https://coveralls.io/repos/github/${user}/${repo}/badge.svg?branch=${branch} | ||
// https://coveralls.io/repos/${service}/${user}/${repo}/badge.svg?branch=${branch} | ||
// https://coveralls.io/repos/${user}/${repo}/badge.svg?branch=${branch} | ||
@@ -14,8 +14,12 @@ // https://img.shields.io/coveralls/${user}/${repo}.svg | ||
if ((match = url.match(/img.shields.io\/coveralls\/(.+)\/(.+)\/(.+)\..+/))) { | ||
// shields badge with branch | ||
data = { user: match[1], repo: match[2], branch: match[3] }; | ||
} else if ((match = url.match(/img.shields.io\/coveralls\/(.+)\/(.+)\..+/))) { | ||
// shields badge | ||
data = { user: match[1], repo: match[2] }; | ||
} else if ((match = url.match(/coveralls.io\/repos\/(.+)\/(.+)\/(.+)\/badge\..+/))) { | ||
// coveralls badge with service | ||
data = { service: match[1], user: match[2], repo: match[3], branch: parsedUrl.query.branch }; | ||
} else if ((match = url.match(/coveralls.io\/repos\/(.+)\/(.+)\/badge\..+/))) { | ||
// coveralls badge | ||
data = { user: match[1], repo: match[2], branch: parsedUrl.query.branch, service: parsedUrl.query.service }; | ||
@@ -22,0 +26,0 @@ } else { |
{ | ||
"name": "detect-readme-badges", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Scans a repository's readme file, searching for badges", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# node-detect-readme-badges | ||
# detect-readme-badges | ||
@@ -82,5 +82,5 @@ > Scans a repository's readme file, searching for badges | ||
**`info.type`** type of the badge. Available types are `build`, `coverage`, `downloads`, `version` and `dependencies`. | ||
**`info.type`** type of the badge. Available types are `build`, `coverage`, `downloads`, `version`, `dependencies` and `misc`. | ||
**`info.service`** is the service that provides the badge. Available services are `coveralls`, `david`, `npm` (shields.io or nodei.co), and `travis`. | ||
**`info.service`** is the service that provides the badge. Available services are [coveralls](https://coveralls.io), [david](https://david-dm.org), npm ([shields.io](https://shields.io) or [nodei.co](https://nodei.co)), [travis](https://travis-ci.org) and [gitter](https://gitter.im). | ||
@@ -92,3 +92,3 @@ **`info.modifiers`** are the badge modifiers that alter the interpretation of the repo/package depending on the service. | ||
`$ npm test` | ||
`$ npm test` | ||
`$ npm test-cov` to get coverage report | ||
@@ -95,0 +95,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17879
13
272