jerabix/moonshine-iconify
Composer 安装命令:
composer require jerabix/moonshine-iconify
包简介
Integrate iconify library to Moonshine
关键字:
README 文档
README
Versions
| Moonshine | Moonshine-iconify |
|---|---|
| v2 | v1 |
| v3 | v2 |
Installation
Install composer package
composer require jerabix/moonshine-iconify
Publish icon.blade.php file from package:
php artisan vendor:publish --tag="moonshine-iconify-blade"
This command put file icon.blade.php in resources/views/vendor/moonshine/components folder.
(Optional) You can also publish config file from package:
php artisan vendor:publish --tag="moonshine-iconify-config"
Usage
When you use ICONIFY_COMPONENT_MODE - you not need additional actions.
When you use DOWNLOAD_USAGE_ICONS_MODE - you need run command:
php artisan moonshine-iconify:icons:download
for download all usage icons in project.
Use moonshine default Icon component as before.
Package work as fallback if icon is not found in moonshine - use iconify library.
Iconify icons can be found here.
Working mode
Package has 2 working mode:
ICONIFY_COMPONENT_MODE iconify doc
Used iconify component. Load icons from iconify API on demand, and cache to user localstorage, need load iconify JS script (package add it automatically).
DOWNLOAD_USAGE_ICONS_MODE
Use package command for download used iconify icons to project. Need re-run command for each new iconify icon in project.
Config
| Key | Description | Default value |
|---|---|---|
| working_mode | Working package mode, can be WorkingMode::ICONIFY_COMPONENT_MODE or WorkingMode::DOWNLOAD_USAGE_ICONS_MODE, check enum description for more information | WorkingMode::ICONIFY_COMPONENT_MODE |
| iconify_script_url | (Only for ICONIFY_COMPONENT_MODE) URL for load iconify script. By default use CDN link from official website. | NULL |
| icon_size_multiplier | (Only for ICONIFY_COMPONENT_MODE) Moonshine icons and iconify icons has different size measurements. Therefore, some kind of multiplier is required so that moonshine icons and iconify do not differ in size | 3.2 |
| additional_detectors | (Only for DOWNLOAD_USAGE_ICONS_MODE) Additional detectors for moonshine icons. When you have own classes with using icons, you need to create detectors for classes. | [] |
| delete_not_used_icons | (Only for DOWNLOAD_USAGE_ICONS_MODE) Delete not used icons in download command? | true |
| detect_icons_path | (Only for DOWNLOAD_USAGE_ICONS_MODE) Path to detect icons usage | app_path() |
Detector N has error: X
When you has error: Detector {DetectorClass} has error: {Error}. Details in log file
Create issue here. And provide info from log file.
Icon not download with command
When you has own class with using icon, you need to create detector for class. Check IconComponentDetector class.
When class provide from Moonshine - you can create issue here.
TODO
- [Local icons mode] Detect
WithIcontrait on classes - [Local icons mode] Detect
Urlclass - [Local icons mode] Add
Iconclass detector - [Local icons mode] Detect
Iconattribute usage - [Local icons mode] Remove not used icons
- [Local icons mode] Not download all icons every run command, only new
- [Local icons mode] Add
modeto config to change dynamic/static icons mode - Add button to ignition error page
- Refactor detect logic
- Update README file for new working mode
- Add tests for detect logic
jerabix/moonshine-iconify 适用场景与选型建议
jerabix/moonshine-iconify 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 825 次下载、GitHub Stars 达 16, 最近一次更新时间为 2024 年 09 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「icon」 「iconify」 「moonshine」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jerabix/moonshine-iconify 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jerabix/moonshine-iconify 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jerabix/moonshine-iconify 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Library to get the apple-touch-icons and favicon from a website.
Icon support for Silverstripe taxonomy terms
Access thousands of icons including popular icon sets, icon fonts and several Emoji sets from a backed Form Widget
Craft CMS Icon Picker
An opinionated Vite integration for CodeIgniter4 projects.
Shim repository for https://github.com/olimsaidov/pixeden-stroke-7-icon
统计信息
- 总下载量: 825
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-07