generated from blade-ui-kit/blade-icons-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added auto update generation config (#4)
* added auto update generation config * updated the tests
- Loading branch information
1 parent
dbb59f9
commit 1245464
Showing
625 changed files
with
657 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ composer.lock | |
phpunit.xml | ||
.php-cs-fixer.cache | ||
package-lock.json | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
<?php | ||
|
||
use Codeat3\BladeIconGeneration\IconProcessor; | ||
|
||
$svgNormalization = static function (string $tempFilepath, array $iconSet) { | ||
|
||
// perform generic optimizations | ||
$iconProcessor = new IconProcessor($tempFilepath, $iconSet); | ||
$iconProcessor | ||
->optimize() | ||
->postOptimizationAsString(function ($svgLine){ | ||
// $svgLine = str_replace('stroke="#000"', 'stroke="currentColor"', $svgLine); | ||
// return str_replace('fill="black"', 'fill="currentColor"', $svgLine); | ||
$replacePattern = [ | ||
'/stroke="#[0-9A-Z]+"/s' => 'stroke="currentColor"', | ||
'/fill="#[0-9A-Z]+"/s' => 'fill="currentColor"', | ||
]; | ||
return preg_replace(array_keys($replacePattern), array_values($replacePattern), $svgLine); | ||
}) | ||
->save(); | ||
}; | ||
|
||
return [ | ||
[ | ||
'source' => null, | ||
// Define a source directory for the sets like a node_modules/ or vendor/ directory... | ||
'source' => __DIR__.'/../dist/public/img', | ||
|
||
// Define a destination directory for your icons. The below is a good default... | ||
'destination' => __DIR__.'/../resources/svg', | ||
|
||
// Enable "safe" mode which will prevent deletion of old icons... | ||
'safe' => false, | ||
|
||
// Call an optional callback to manipulate the icon | ||
// with the pathname of the icon and the settings from above... | ||
'after' => $svgNormalization, | ||
|
||
'is-solid' => true, | ||
], | ||
]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.