-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add php-icons CLI tool with init and scan commands
- rename project from php-iconify to php-icons - update README
- Loading branch information
1 parent
7e96444
commit 7601070
Showing
24 changed files
with
1,860 additions
and
330 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
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,2 +1,2 @@ | ||
/vendor/ | ||
/php-iconify/ | ||
/src/Icons.php |
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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (php_sapi_name() !== 'cli') { | ||
exit; | ||
} | ||
|
||
if (!defined('COMPOSER_BIN_DIR')) { | ||
define('COMPOSER_BIN_DIR', $_composer_bin_dir ?? __DIR__ . '/../vendor/bin'); | ||
} | ||
|
||
require __DIR__ . '/../src/Console/Constants.php'; | ||
require __DIR__ . '/../src/Console/helpers.php'; | ||
|
||
require COMPOSER_AUTOLOAD_PATH; | ||
|
||
use Ahc\Cli\Application; | ||
use Composer\InstalledVersions; | ||
use PHPIcons\Console\Commands\InitCommand; | ||
use PHPIcons\Console\Commands\ScanCommand; | ||
|
||
$version = InstalledVersions::getVersion('yassinedoghri/php-icons'); | ||
|
||
$app = new Application( | ||
'PHPIcons', | ||
$version | ||
); | ||
|
||
$app->add(new InitCommand, 'i'); | ||
$app->add(new ScanCommand, 's'); | ||
|
||
$logo = " | ||
_ _ | ||
_ __ | |__ _ __ (_) ___ ___ _ __ ___ | ||
| '_ \| '_ \| '_ \ | |/ __/ _ \| '_ \/ __| | ||
| |_) | | | | |_) | | | (_| (_) | | | \__ \ | ||
| .__/|_| |_| .__/ |_|\___\___/|_| |_|___/ | ||
|_| |_| | ||
A convenient PHP library to render svg icons | ||
---------------------------------------------- | ||
"; | ||
|
||
$app->logo($logo)->handle($_SERVER['argv']); |
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
Oops, something went wrong.