Skip to content

Commit d0a6ed7

Browse files
PierrePaulMatthieuScarsetchesn0k
authored
Use PNG for SDC's thumbnail (#192)
Co-authored-by: Matthieu SCARSET <[email protected]> Co-authored-by: chesn0k <[email protected]>
1 parent 6fa6677 commit d0a6ed7

File tree

6 files changed

+4
-4
lines changed

6 files changed

+4
-4
lines changed

src/Command/SingleDirectoryComponent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ private function generateAssets(array $vars, AssetCollection $assets): void {
116116
$assets->addFile($component_path . '{component_machine_name}.component.yml', 'component.twig');
117117
$assets->addFile($component_path . 'README.md', 'readme.twig');
118118

119-
$contents = \file_get_contents($this->getTemplatePath() . \DIRECTORY_SEPARATOR . 'thumbnail.jpg');
120-
$thumbnail = new File($component_path . 'thumbnail.jpg');
119+
$contents = \file_get_contents($this->getTemplatePath() . \DIRECTORY_SEPARATOR . 'thumbnail.png');
120+
$thumbnail = new File($component_path . 'thumbnail.png');
121121
$thumbnail->content($contents);
122122
$assets[] = $thumbnail;
123123
}

templates/_sdc/thumbnail.jpg

-37.6 KB
Binary file not shown.

templates/_sdc/thumbnail.png

72.8 KB
Loading

tests/functional/Generator/SingleDirectoryComponentTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function testGenerator(): void {
101101
• components/bar/bar.js
102102
• components/bar/bar.twig
103103
• components/bar/README.md
104-
• components/bar/thumbnail.jpg
104+
• components/bar/thumbnail.png
105105

106106
TXT;
107107
$this->assertDisplay($expected_display);
@@ -111,7 +111,7 @@ public function testGenerator(): void {
111111
$this->assertGeneratedFile('components/bar/bar.js');
112112
$this->assertGeneratedFile('components/bar/bar.twig');
113113
$this->assertGeneratedFile('components/bar/README.md');
114-
$this->assertGeneratedFile('components/bar/thumbnail.jpg');
114+
$this->assertGeneratedFile('components/bar/thumbnail.png');
115115
}
116116

117117
}
Binary file not shown.
Loading

0 commit comments

Comments
 (0)