Skip to content

Commit 5d11c2c

Browse files
Melissa Bentsebastianbergmann
Melissa Bent
authored andcommitted
Issue #654: Copy assets to underscored directories
1 parent 55d376e commit 5d11c2c

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

src/Report/Html/Facade.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,19 @@ public function process(CodeCoverage $coverage, string $target): void
118118
*/
119119
private function copyFiles(string $target): void
120120
{
121-
$dir = $this->getDirectory($target . '.css');
121+
$dir = $this->getDirectory($target . '_css');
122122

123123
\copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css');
124124
\copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css');
125125
\copy($this->templatePath . 'css/style.css', $dir . 'style.css');
126126
\copy($this->templatePath . 'css/custom.css', $dir . 'custom.css');
127127
\copy($this->templatePath . 'css/octicons.css', $dir . 'octicons.css');
128128

129-
$dir = $this->getDirectory($target . '.icons');
129+
$dir = $this->getDirectory($target . '_icons');
130130
\copy($this->templatePath . 'icons/file-code.svg', $dir . 'file-code.svg');
131131
\copy($this->templatePath . 'icons/file-directory.svg', $dir . 'file-directory.svg');
132132

133-
$dir = $this->getDirectory($target . '.js');
133+
$dir = $this->getDirectory($target . '_js');
134134
\copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js');
135135
\copy($this->templatePath . 'js/popper.min.js', $dir . 'popper.min.js');
136136
\copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js');

src/Report/Html/Renderer/Directory.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function renderItem(Node $node, bool $total = false): string
7676

7777
$up = \str_repeat('../', \count($node->getPathAsArray()) - 2);
7878

79-
$data['icon'] = \sprintf('<img src="%s.icons/file-directory.svg" class="octicon" />', $up);
79+
$data['icon'] = \sprintf('<img src="%s_icons/file-directory.svg" class="octicon" />', $up);
8080
} else {
8181
$data['name'] = \sprintf(
8282
'<a href="%s.html">%s</a>',
@@ -86,7 +86,7 @@ protected function renderItem(Node $node, bool $total = false): string
8686

8787
$up = \str_repeat('../', \count($node->getPathAsArray()) - 2);
8888

89-
$data['icon'] = \sprintf('<img src="%s.icons/file-code.svg" class="octicon" />', $up);
89+
$data['icon'] = \sprintf('<img src="%s_icons/file-code.svg" class="octicon" />', $up);
9090
}
9191
}
9292

src/Report/Html/Renderer/Template/dashboard.html.dist

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8">
55
<title>Dashboard for {{full_path}}</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<link href="{{path_to_root}}.css/bootstrap.min.css" rel="stylesheet" type="text/css">
8-
<link href="{{path_to_root}}.css/nv.d3.min.css" rel="stylesheet" type="text/css">
9-
<link href="{{path_to_root}}.css/style.css" rel="stylesheet" type="text/css">
10-
<link href="{{path_to_root}}.css/custom.css" rel="stylesheet" type="text/css">
7+
<link href="{{path_to_root}}_css/bootstrap.min.css" rel="stylesheet" type="text/css">
8+
<link href="{{path_to_root}}_css/nv.d3.min.css" rel="stylesheet" type="text/css">
9+
<link href="{{path_to_root}}_css/style.css" rel="stylesheet" type="text/css">
10+
<link href="{{path_to_root}}_css/custom.css" rel="stylesheet" type="text/css">
1111
</head>
1212
<body>
1313
<header>
@@ -137,9 +137,9 @@
137137
</p>
138138
</footer>
139139
</div>
140-
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
141-
<script src="{{path_to_root}}.js/d3.min.js" type="text/javascript"></script>
142-
<script src="{{path_to_root}}.js/nv.d3.min.js" type="text/javascript"></script>
140+
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
141+
<script src="{{path_to_root}}_js/d3.min.js" type="text/javascript"></script>
142+
<script src="{{path_to_root}}_js/nv.d3.min.js" type="text/javascript"></script>
143143
<script type="text/javascript">
144144
$(document).ready(function() {
145145
nv.addGraph(function() {

src/Report/Html/Renderer/Template/directory.html.dist

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8">
55
<title>Code Coverage for {{full_path}}</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<link href="{{path_to_root}}.css/bootstrap.min.css" rel="stylesheet" type="text/css">
8-
<link href="{{path_to_root}}.css/octicons.css" rel="stylesheet" type="text/css">
9-
<link href="{{path_to_root}}.css/style.css" rel="stylesheet" type="text/css">
10-
<link href="{{path_to_root}}.css/custom.css" rel="stylesheet" type="text/css">
7+
<link href="{{path_to_root}}_css/bootstrap.min.css" rel="stylesheet" type="text/css">
8+
<link href="{{path_to_root}}_css/octicons.css" rel="stylesheet" type="text/css">
9+
<link href="{{path_to_root}}_css/style.css" rel="stylesheet" type="text/css">
10+
<link href="{{path_to_root}}_css/custom.css" rel="stylesheet" type="text/css">
1111
</head>
1212
<body>
1313
<header>

src/Report/Html/Renderer/Template/file.html.dist

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8">
55
<title>Code Coverage for {{full_path}}</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<link href="{{path_to_root}}.css/bootstrap.min.css" rel="stylesheet" type="text/css">
8-
<link href="{{path_to_root}}.css/octicons.css" rel="stylesheet" type="text/css">
9-
<link href="{{path_to_root}}.css/style.css" rel="stylesheet" type="text/css">
10-
<link href="{{path_to_root}}.css/custom.css" rel="stylesheet" type="text/css">
7+
<link href="{{path_to_root}}_css/bootstrap.min.css" rel="stylesheet" type="text/css">
8+
<link href="{{path_to_root}}_css/octicons.css" rel="stylesheet" type="text/css">
9+
<link href="{{path_to_root}}_css/style.css" rel="stylesheet" type="text/css">
10+
<link href="{{path_to_root}}_css/custom.css" rel="stylesheet" type="text/css">
1111
</head>
1212
<body>
1313
<header>
@@ -64,9 +64,9 @@
6464
</a>
6565
</footer>
6666
</div>
67-
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
68-
<script src="{{path_to_root}}.js/popper.min.js" type="text/javascript"></script>
69-
<script src="{{path_to_root}}.js/bootstrap.min.js" type="text/javascript"></script>
70-
<script src="{{path_to_root}}.js/file.js" type="text/javascript"></script>
67+
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
68+
<script src="{{path_to_root}}_js/popper.min.js" type="text/javascript"></script>
69+
<script src="{{path_to_root}}_js/bootstrap.min.js" type="text/javascript"></script>
70+
<script src="{{path_to_root}}_js/file.js" type="text/javascript"></script>
7171
</body>
7272
</html>

0 commit comments

Comments
 (0)