Skip to content

Commit 8fdacbf

Browse files
author
Melissa Bent
committed
Issue sebastianbergmann#654: Copy assets to underscored directories (5.3.2 backport)
1 parent c896779 commit 8fdacbf

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

src/Report/Html/Facade.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ public function process(CodeCoverage $coverage, $target)
126126
*/
127127
private function copyFiles($target)
128128
{
129-
$dir = $this->getDirectory($target . '.css');
129+
$dir = $this->getDirectory($target . '_css');
130130

131131
\file_put_contents(
132132
$dir . 'bootstrap.min.css',
133133
\str_replace(
134134
'url(../fonts/',
135-
'url(../.fonts/',
135+
'url(../_fonts/',
136136
\file_get_contents($this->templatePath . 'css/bootstrap.min.css')
137137
)
138138

@@ -141,14 +141,14 @@ private function copyFiles($target)
141141
\copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css');
142142
\copy($this->templatePath . 'css/style.css', $dir . 'style.css');
143143

144-
$dir = $this->getDirectory($target . '.fonts');
144+
$dir = $this->getDirectory($target . '_fonts');
145145
\copy($this->templatePath . 'fonts/glyphicons-halflings-regular.eot', $dir . 'glyphicons-halflings-regular.eot');
146146
\copy($this->templatePath . 'fonts/glyphicons-halflings-regular.svg', $dir . 'glyphicons-halflings-regular.svg');
147147
\copy($this->templatePath . 'fonts/glyphicons-halflings-regular.ttf', $dir . 'glyphicons-halflings-regular.ttf');
148148
\copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff', $dir . 'glyphicons-halflings-regular.woff');
149149
\copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff2', $dir . 'glyphicons-halflings-regular.woff2');
150150

151-
$dir = $this->getDirectory($target . '.js');
151+
$dir = $this->getDirectory($target . '_js');
152152
\copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js');
153153
\copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js');
154154
\copy($this->templatePath . 'js/holder.min.js', $dir . 'holder.min.js');

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
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">
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">
1010
<!--[if lt IE 9]>
11-
<script src="{{path_to_root}}.js/html5shiv.min.js"></script>
12-
<script src="{{path_to_root}}.js/respond.min.js"></script>
11+
<script src="{{path_to_root}}_js/html5shiv.min.js"></script>
12+
<script src="{{path_to_root}}_js/respond.min.js"></script>
1313
<![endif]-->
1414
</head>
1515
<body>
@@ -138,11 +138,11 @@
138138
</p>
139139
</footer>
140140
</div>
141-
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
142-
<script src="{{path_to_root}}.js/bootstrap.min.js" type="text/javascript"></script>
143-
<script src="{{path_to_root}}.js/holder.min.js" type="text/javascript"></script>
144-
<script src="{{path_to_root}}.js/d3.min.js" type="text/javascript"></script>
145-
<script src="{{path_to_root}}.js/nv.d3.min.js" type="text/javascript"></script>
141+
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
142+
<script src="{{path_to_root}}_js/bootstrap.min.js" type="text/javascript"></script>
143+
<script src="{{path_to_root}}_js/holder.min.js" type="text/javascript"></script>
144+
<script src="{{path_to_root}}_js/d3.min.js" type="text/javascript"></script>
145+
<script src="{{path_to_root}}_js/nv.d3.min.js" type="text/javascript"></script>
146146
<script type="text/javascript">
147147
$(document).ready(function() {
148148
nv.addGraph(function() {

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
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/style.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/style.css" rel="stylesheet" type="text/css">
99
<!--[if lt IE 9]>
10-
<script src="{{path_to_root}}.js/html5shiv.min.js"></script>
11-
<script src="{{path_to_root}}.js/respond.min.js"></script>
10+
<script src="{{path_to_root}}_js/html5shiv.min.js"></script>
11+
<script src="{{path_to_root}}_js/respond.min.js"></script>
1212
<![endif]-->
1313
</head>
1414
<body>
@@ -54,8 +54,8 @@
5454
</p>
5555
</footer>
5656
</div>
57-
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
58-
<script src="{{path_to_root}}.js/bootstrap.min.js" type="text/javascript"></script>
59-
<script src="{{path_to_root}}.js/holder.min.js" type="text/javascript"></script>
57+
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
58+
<script src="{{path_to_root}}_js/bootstrap.min.js" type="text/javascript"></script>
59+
<script src="{{path_to_root}}_js/holder.min.js" type="text/javascript"></script>
6060
</body>
6161
</html>

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
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/style.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/style.css" rel="stylesheet" type="text/css">
99
<!--[if lt IE 9]>
10-
<script src="{{path_to_root}}.js/html5shiv.min.js"></script>
11-
<script src="{{path_to_root}}.js/respond.min.js"></script>
10+
<script src="{{path_to_root}}_js/html5shiv.min.js"></script>
11+
<script src="{{path_to_root}}_js/respond.min.js"></script>
1212
<![endif]-->
1313
</head>
1414
<body>
@@ -60,9 +60,9 @@
6060
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
6161
</footer>
6262
</div>
63-
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
64-
<script src="{{path_to_root}}.js/bootstrap.min.js" type="text/javascript"></script>
65-
<script src="{{path_to_root}}.js/holder.min.js" type="text/javascript"></script>
66-
<script src="{{path_to_root}}.js/file.js" type="text/javascript"></script>
63+
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
64+
<script src="{{path_to_root}}_js/bootstrap.min.js" type="text/javascript"></script>
65+
<script src="{{path_to_root}}_js/holder.min.js" type="text/javascript"></script>
66+
<script src="{{path_to_root}}_js/file.js" type="text/javascript"></script>
6767
</body>
6868
</html>

0 commit comments

Comments
 (0)