Permalink
Browse files

feat(coverage): remove coverage badge hack.

  • Loading branch information...
h13i32maru committed Sep 19, 2016
1 parent a665c5d commit 6869b06e293c2471978ef96882baef6cc14c1766
@@ -1,3 +1,2 @@
-<span class="esdoc-coverage"></span>
# My Project
this is My Project README
@@ -1,3 +1,2 @@
-<span class="esdoc-coverage"></span>
# My Project
this is My Project README
@@ -1,3 +1,2 @@
-<span class="esdoc-coverage"></span>
# My Project
this is My Project README
@@ -1,3 +1,2 @@
-<span class="esdoc-coverage"></span>
# My Project
this is My Project README
@@ -1008,31 +1008,6 @@ export default class DocBuilder {
}
}
- /**
- * build coverage html.
- * @param {CoverageObject} coverageObj - target coverage object.
- * @returns {string} html of coverage badge.
- * @private
- * @deprecated
- */
- _buildCoverageHTML(coverageObj) {
- let coverage = Math.floor(100 * coverageObj.actualCount / coverageObj.expectCount);
- let colorClass;
- if (coverage < 50) {
- colorClass = 'esdoc-coverage-low';
- } else if (coverage < 90) {
- colorClass = 'esdoc-coverage-middle';
- } else {
- colorClass = 'esdoc-coverage-high';
- }
-
- let html = `<a href="https://esdoc.org" class="esdoc-coverage-wrap">
- <span class="esdoc-coverage-label">document</span><span class="esdoc-coverage-ratio ${colorClass}">${coverage}%</span>
- </a>`;
-
- return html;
- }
-
//_buildAuthorHTML(doc, separator = '\n') {
// if (!doc.author) return '';
//
@@ -56,16 +56,6 @@ export default class IndexDocBuilder extends DocBuilder {
ice.load('index', indexContent);
}
- let result = ice.html;
-
- // fixme: deprecated
- if (this._config.coverage) {
- let $ = cheerio.load(result);
- if ($('.esdoc-coverage').length) {
- console.log('[deprecated] coverage badge is deprecated. use badge of ESDoc Hosting Service(https://doc.esdoc.org)');
- }
- }
-
- return result;
+ return ice.html;
}
}
@@ -740,55 +740,6 @@ table.test-summary .test-target > span:first-child {
display: inline-block;
}
-/* coverage badge */
-.esdoc-coverage {
- display: inline-block;
- height: 20px;
- vertical-align: top;
-}
-
-h1 .esdoc-coverage {
- position: relative;
- top: -4px;
-}
-
-.esdoc-coverage-wrap {
- color: white;
- font-size: 12px;
- font-weight: 500;
-}
-
-.esdoc-coverage-label {
- padding: 3px 4px 3px 6px;
- background: linear-gradient(to bottom, #5e5e5e 0%,#4c4c4c 100%);
- border-radius: 4px 0 0 4px;
- display: inline-block;
- height: 20px;
- box-sizing: border-box;
- line-height: 14px;
-}
-
-.esdoc-coverage-ratio {
- padding: 3px 6px 3px 4px;
- border-radius: 0 4px 4px 0;
- display: inline-block;
- height: 20px;
- box-sizing: border-box;
- line-height: 14px;
-}
-
-.esdoc-coverage-low {
- background: linear-gradient(to bottom, #db654f 0%,#c9533d 100%);
-}
-
-.esdoc-coverage-middle {
- background: linear-gradient(to bottom, #dab226 0%,#c9a179 100%);
-}
-
-.esdoc-coverage-high {
- background: linear-gradient(to bottom, #4fc921 0%,#3eb810 100%);
-}
-
.github-markdown .manual-toc {
padding-left: 0;
}
@@ -1,6 +1,5 @@
[![Build Status](https://travis-ci.org/esdoc/esdoc.svg?branch=master)](https://travis-ci.org/esdoc/esdoc)
[![Coverage Status](https://coveralls.io/repos/esdoc/esdoc/badge.svg)](https://coveralls.io/r/esdoc/esdoc)
-<span class="esdoc-coverage"></span>
# ESDoc Test Fixture
this is ESDoc Test Fixture README.

0 comments on commit 6869b06

Please sign in to comment.