Skip to content

Commit 3d3f31a

Browse files
authored
Merge pull request #2 from wireui/feature/separate-components
Feature/separate-components
2 parents d070d40 + 542c233 commit 3d3f31a

File tree

6,290 files changed

+36
-32
lines changed

Some content is hidden

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

6,290 files changed

+36
-32
lines changed

README.md

Lines changed: 3 additions & 9 deletions

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@
3737
"test": "./vendor/bin/pest --coverage --min=100",
3838
"phpstan": "./vendor/bin/phpstan analyse src --level max",
3939
"phpcs:fix": "./vendor/bin/php-cs-fixer fix",
40-
"phpcs:check": "./vendor/bin/php-cs-fixer fix --dry-run --using-cache=no"
40+
"phpcs:check": "./vendor/bin/php-cs-fixer fix --dry-run --using-cache=no",
41+
"generate-icons": "./generate-icons.sh",
42+
"verify": [
43+
"@phpcs:check",
44+
"@phpstan",
45+
"@test"
46+
]
4147
},
4248
"autoload": {
4349
"psr-4": {

generate-icons.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
# make a clean state
99
rm -rf .tmp
10-
rm -rf src/views/icons/{thin,light,fill,regular,duotone,bold}
11-
mkdir -p src/views/icons/{thin,light,fill,regular,duotone,bold}
10+
rm -rf src/views/components/{thin,light,fill,regular,duotone,bold}
11+
mkdir -p src/views/components/{thin,light,fill,regular,duotone,bold}
1212

1313
# prepare icons
1414
curl https://phosphoricons.com/assets/phosphor-icons.zip --create-dirs -o .tmp/icons.zip
@@ -23,10 +23,10 @@ for FILE in .tmp/icons/SVGs/{Thin,Light,Fill,Regular,Duotone,Bold}/*.svg; do
2323
echo $NEW_FILE
2424
done
2525

26-
mv .tmp/icons/SVGs/Thin/* src/views/icons/thin
27-
mv .tmp/icons/SVGs/Light/* src/views/icons/light
28-
mv .tmp/icons/SVGs/Fill/* src/views/icons/fill
29-
mv .tmp/icons/SVGs/Regular/* src/views/icons/regular
30-
mv .tmp/icons/SVGs/Duotone/* src/views/icons/duotone
31-
mv .tmp/icons/SVGs/Bold/* src/views/icons/bold
26+
mv .tmp/icons/SVGs/Thin/* src/views/components/thin
27+
mv .tmp/icons/SVGs/Light/* src/views/components/light
28+
mv .tmp/icons/SVGs/Fill/* src/views/components/fill
29+
mv .tmp/icons/SVGs/Regular/* src/views/components/regular
30+
mv .tmp/icons/SVGs/Duotone/* src/views/components/duotone
31+
mv .tmp/icons/SVGs/Bold/* src/views/components/bold
3232
rm -rf .tmp

src/Icon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(
2222

2323
public function render(): View|Factory
2424
{
25-
return view("wireui.phosphor::icons.{$this->variant}.{$this->name}");
25+
return view("phosphor.icons::components.{$this->variant}.{$this->name}");
2626
}
2727

2828
private function getVariant(): string

src/PhosphorIconsServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ protected function registerConfig(): void
1717
{
1818
$rootDir = __DIR__;
1919

20-
$this->loadViewsFrom("{$rootDir}/views", 'wireui.phosphor');
20+
$this->loadViewsFrom("{$rootDir}/views", 'phosphor.icons');
2121
$this->mergeConfigFrom("{$rootDir}/config.php", 'wireui.phosphoricons');
2222
$this->publishes(
2323
["{$rootDir}/config.php" => config_path('wireui/phosphoricons.php')],

src/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| <x-icon variant="thin" />
1414
|
1515
*/
16-
'variant' => env('WIREUI_PHOSPHOR_ICONS_VARIANT', 'regular'),
16+
'variant' => 'regular',
1717

1818
/*
1919
|--------------------------------------------------------------------------
@@ -25,5 +25,5 @@
2525
| <x-icon ... />
2626
|
2727
*/
28-
'alias' => env('WIREUI_PHOSPHOR_ICONS_ALIAS', 'icon'),
28+
'alias' => 'icon',
2929
];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)