Skip to content

Commit de8f9f9

Browse files
authored
auto update scripts (#4)
* auto update scripts * fixed tests
1 parent 79d941f commit de8f9f9

File tree

168 files changed

+209
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+209
-113
lines changed

.commit

Whitespace-only changes.

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REPOSITORY=stephenhutchings/microns
2+
BRANCH=master

config/generation.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
use Codeat3\BladeIconGeneration\IconProcessor;
4+
5+
$svgNormalization = static function (string $tempFilepath, array $iconSet) {
6+
7+
// perform generic optimizations
8+
$iconProcessor = new IconProcessor($tempFilepath, $iconSet);
9+
$iconProcessor
10+
->optimize()
11+
->postOptimizationAsString(function ($svgLine){
12+
return $svgLine;
13+
// $replacePattern = [
14+
// '/stroke="#000"/s' => 'stroke="currentColor"',
15+
// ];
16+
// return preg_replace(array_keys($replacePattern), array_values($replacePattern), $svgLine);
17+
})
18+
->save();
19+
};
20+
21+
return [
22+
[
23+
// Define a source directory for the sets like a node_modules/ or vendor/ directory...
24+
'source' => __DIR__.'/../dist/svg',
25+
26+
// Define a destination directory for your icons. The below is a good default...
27+
'destination' => __DIR__.'/../resources/svg',
28+
29+
// Enable "safe" mode which will prevent deletion of old icons...
30+
'safe' => false,
31+
32+
// Call an optional callback to manipulate the icon
33+
// with the pathname of the icon and the settings from above...
34+
'after' => $svgNormalization,
35+
36+
'is-solid' => true,
37+
],
38+
];

resources/svg/above.svg

Lines changed: 1 addition & 0 deletions
Loading

resources/svg/align-center.svg

Lines changed: 1 addition & 1 deletion
Loading

resources/svg/align-left.svg

Lines changed: 1 addition & 1 deletion
Loading

resources/svg/align-right.svg

Lines changed: 1 addition & 1 deletion
Loading

resources/svg/arrow-down.svg

Lines changed: 1 addition & 1 deletion
Loading

resources/svg/arrow-left.svg

Lines changed: 1 addition & 1 deletion
Loading

resources/svg/arrow-right.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)