tomsh-hr/yii2-eruda
Composer 安装命令:
composer require tomsh-hr/yii2-eruda
包简介
Mobile developer tools based on eruda
README 文档
README
Console for Mobile Browsers based on Eruda.
More info & Demo
Visit Eruda github site.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "tomsh-hr/yii2-eruda:*"
or add
"tomsh-hr/eruda": "*"
to the require section of your composer.json.
Usage
Put this code in your main template:
<?php tomsh\eruda\Eruda::widget(); ?>
Configuration
To configure eruda js put options in clientOptions like this:
<?php tomsh\eruda\Eruda::widget([
'clientOptions' => [
'container' => 'erudaElement', // ID of an element (this is not same as in eruda configuration)
'tool' => ['console', 'elements']
],
'onlyByUrl' => false, // Optional, default true
'urlGetter' => 'eruda', // Optional, default 'eruda'
'onlyInDev' => false // Optional, default false
]); ?>
NOTE: container configuration option accepts element id and not js object like in eruda original configuration. For other configuration options visit eruda documentation.
Widget options
| Name | Type | Desc |
|---|---|---|
| onlyByUrl | boolean | Load eruda script when url parameter is passed. Example http://domain/?eruda=true |
| urlGetter | string | Url parameter to look. Default 'eruda' |
| onlyInDev | boolean | Load eruda only in development environment |
onlyByUrl (default: false)
The JavaScript file size is quite huge(about 100kb gzipped) and therefore not suitable to include in mobile pages. It's recommended to load eruda only when eruda is set to true on url(http://domain?eruda=true). Set this to true if you want to load script when url parameter is passed.
urlGetter (default: 'eruda')
Change url parameter to look for. Ex. put 'console' and than go to url(http://domain?console=true)
onlyInDev (default: false)
If you set this to true eruda script will be loaded only in development environment.
tomsh-hr/yii2-eruda 适用场景与选型建议
tomsh-hr/yii2-eruda 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「assets」 「console」 「mobile」 「Developer tools」 「yii2」 「yii2-eruda」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tomsh-hr/yii2-eruda 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tomsh-hr/yii2-eruda 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tomsh-hr/yii2-eruda 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This class provides you with an easy-to-use interface to progress bars.
Asset Management for PHP
Beyonic PHP Library
A Laravel package to retrieve data from Google Search Console
Additional artisan commands for Laravel
Caching and compression for Twig assets (JavaScript and CSS).
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-09