Updating NPM dependencies
This commit is contained in:
14
node_modules/istanbul-reports/lib/html/index.js
generated
vendored
14
node_modules/istanbul-reports/lib/html/index.js
generated
vendored
@@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
/*
|
||||
Copyright 2012-2015, Yahoo Inc.
|
||||
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||||
@@ -5,6 +6,7 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const html = require('html-escaper');
|
||||
const { ReportBase } = require('istanbul-lib-report');
|
||||
const annotator = require('./annotator');
|
||||
|
||||
function htmlHead(details) {
|
||||
@@ -14,7 +16,10 @@ function htmlHead(details) {
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="${html.escape(details.prettify.css)}" />
|
||||
<link rel="stylesheet" href="${html.escape(details.base.css)}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="${html.escape(
|
||||
details.favicon
|
||||
)}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(${html.escape(details.sorter.image)});
|
||||
@@ -230,7 +235,7 @@ const standardLinkMapper = {
|
||||
relativePath(source, target) {
|
||||
const targetPath = this.getPath(target);
|
||||
const sourcePath = path.dirname(this.getPath(source));
|
||||
return path.relative(sourcePath, targetPath);
|
||||
return path.posix.relative(sourcePath, targetPath);
|
||||
},
|
||||
|
||||
assetPath(node, name) {
|
||||
@@ -245,8 +250,10 @@ function fixPct(metrics) {
|
||||
return metrics;
|
||||
}
|
||||
|
||||
class HtmlReport {
|
||||
class HtmlReport extends ReportBase {
|
||||
constructor(opts) {
|
||||
super();
|
||||
|
||||
this.verbose = opts.verbose;
|
||||
this.linkMapper = opts.linkMapper || standardLinkMapper;
|
||||
this.subdir = opts.subdir || '';
|
||||
@@ -299,6 +306,7 @@ class HtmlReport {
|
||||
js: linkMapper.assetPath(node, 'prettify.js'),
|
||||
css: linkMapper.assetPath(node, 'prettify.css')
|
||||
};
|
||||
templateData.favicon = linkMapper.assetPath(node, 'favicon.png');
|
||||
}
|
||||
|
||||
getTemplateData() {
|
||||
|
||||
Reference in New Issue
Block a user