diff --git a/README.md b/README.md index 14ce289..969c0a7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Code coverage HTML reporter with Azure DevOps limitations in mind. Based on istanbuljs `html` built-in [reporter](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-reports/lib/html). -![Screenshot](assets/reporter.jpg) +![image](https://user-images.githubusercontent.com/562658/53685980-5f66bc80-3d2a-11e9-9081-603e32b956a0.png) ## License diff --git a/assets/reporter.jpg b/assets/reporter.jpg deleted file mode 100644 index eea3686..0000000 Binary files a/assets/reporter.jpg and /dev/null differ diff --git a/package.json b/package.json index 3e324d4..aea61d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "istanbul-azure-reporter", - "version": "0.1.1", + "version": "0.1.2", "description": "Code coverage HTML reporter with Azure DevOps limitations in mind", "main": "dist/index.js", "scripts": { @@ -20,6 +20,9 @@ ], "author": "Martynas Žilinskas (https://github.com/MartynasZilinskas)", "license": "MIT", + "bugs": "https://github.com/ReactWay/istanbul-azure-reporter/issues", + "repository": "reactway/istanbul-azure-reporter", + "homepage": "https://github.com/ReactWay/istanbul-azure-reporter", "devDependencies": { "@types/classnames": "^2.2.7", "@types/istanbul-lib-report": "^1.1.0", diff --git a/src/components/details/details-code-view.tsx b/src/components/details/details-code-view.tsx index f573ac9..bb79a2c 100644 --- a/src/components/details/details-code-view.tsx +++ b/src/components/details/details-code-view.tsx @@ -128,7 +128,7 @@ export function DetailsCodeView(props: Props): JSX.Element { let hitCountLines: JSX.Element[] = []; for (let line = 1; line <= linesCount; line++) { lines.push( -
+ ); diff --git a/src/components/layout.tsx b/src/components/layout.tsx index e7d5f19..9cf7216 100644 --- a/src/components/layout.tsx +++ b/src/components/layout.tsx @@ -26,19 +26,23 @@ function BreadCrumbs(props: { breadcrumbs: Link[] }): JSX.Element { .map(breadcrumb => { if (breadcrumb.url != null) { return ( - + {breadcrumb.name} ); } else { - return {breadcrumb.name}; + return ( + + {breadcrumb.name} + + ); } }) .reduce((arr, item, currentIndex) => { if (currentIndex != props.breadcrumbs.length - 1) { return arr.concat( item, - + / ); @@ -50,7 +54,7 @@ function BreadCrumbs(props: { breadcrumbs: Link[] }): JSX.Element { links = All files; } - return

{links}

; + return
{links}
; } interface Props { diff --git a/styles/details.scss b/styles/details.scss index dae7869..9aedd00 100644 --- a/styles/details.scss +++ b/styles/details.scss @@ -1,3 +1,7 @@ +$line-color-covered: #e6f5d0; +$line-color-not-covered: #fccccc; +$line-color-dark-not-covered: #fcdfdf; + .coverage { display: flex; flex-flow: row; @@ -15,11 +19,11 @@ > tr { .code-lines-container { - .code-line { + .line { text-align: right; > a { - color: rgb(0, 116, 217); + color: #0074d9; width: 100%; text-decoration: none; @@ -30,28 +34,42 @@ } } - .code-hit-counter > * { - text-align: right; - background-color: lightgrey; - padding: 0 0.25rem; + .code-hit-counter { + .line { + text-align: right; + background-color: lightgrey; + padding: 0 0.25rem; + + &.covered { + background-color: $line-color-covered; + } + + &.not-covered { + background-color: $line-color-not-covered; + } + } } .code-container { - white-space: pre; + display: flex; + flex-flow: column; padding-left: 0; - } - // Highlighting for lines. - .not-covered { - background-color: #fccccc; - } + .line { + white-space: pre; + + &.not-covered { + background-color: $line-color-not-covered; + } - .line.not-covered { - background-color: #fcdfdf; + .not-covered { + background-color: $line-color-dark-not-covered; + } + } } - .covered { - background-color: rgb(230, 245, 208); + .line { + height: 19px; } } } diff --git a/styles/layout.scss b/styles/layout.scss index b064618..07bc112 100644 --- a/styles/layout.scss +++ b/styles/layout.scss @@ -16,7 +16,7 @@ padding: 1rem; .breadcrumbs { - > *:not(:last-child) { + > .item:not(:last-child) { padding-right: 0.5rem; } } @@ -40,7 +40,7 @@ color: #7f7f7f; } - > *:not(:last-child) { + > span:not(:last-child) { margin-right: 0.25rem; } }