devgeniem/dustpress-debugger
Composer 安装命令:
composer require devgeniem/dustpress-debugger
包简介
Provides handy ajaxified debugger tool for DustPress based themes.
README 文档
README
DustPress Plugin: DustPress Debugger
DustPress Debugger is a WordPress plugin which displays the data loaded by your current DustPress model in a json viewer.
- Contributors: devgeniem / Nomafin, villesiltala
- Plugin url: https://github.com/devgeniem/dustpress-debugger
- Tags: dustpress, wordpress, plugins, dustjs, dust.js
- Requires at least: 4.2.0
- Tested up to: 5.3.0
- License: GPL-3.0
- License URI: http://www.gnu.org/licenses/gpl-3.0.html
Installation
Composer
Install with composer by running:
$ composer require devgeniem/dustpress-debugger
OR add it into your composer.json:
{
"require": {
"devgeniem/dustpress-debugger": "*"
}
}
Manually
- Clone the DustPress Debugger repository into you WordPress plugins directory.
Activation
To enable the debugger go to the WordPress dashboard and activate the plugin. After activation users with with the manage_options capability can enable the debugger on the user profile page by checking the DustPress Debugger enabled checkbox.
You can also activate the debugger on any user by defining DUSTPRESS_DEBUGGER_ALWAYS_ON constant in your project. This will override the manual settings, so it is not recommended to use this setting in production!
Usage
Install the browser extension, open your devtools and select the "dustpress-debugger" tab. If on chrome you will need to request scripting & cookie access to the relevant urls when opening the view for the first time.
Building the browser extension
Select the specified node version in the .nvmrc file by installing nvm and running:
nvm install # install specified node version nvm use # use specified node version
Or by installing it manually.
Then run the following commands:
npm ci # install npm packages npm run build # build the extensions assets
For a firefox build which uses manifest version 2 you can run:
npm run build -- --env=target=firefox
The built assets will be in the dist/ folder.
Development version
You can build the development version of the extension by running the commands specified in the building section but instead of npm run build run the following:
npm run watch
Or for the firefox version:
npm run watch -- --env=target=firefox
This will build the assets and wait for changes to files.
Then add the contents of the dist/ folder as a temporary or unpackaged plugin depending on which browser you are using.
Add data with JavaScript
You can manually add data into the debugger by using the extend function of the global debugger object in JavaScript. The first parameter is your data. The second parameter is the key under which your data is added. You can add multiple data sets under the same key.
window.DustPressDebugger.extend('someData', 'my-data-key');
If you are using the DustPress.js plugin, the data loaded via AJAX is automatically added into the debugger view.
devgeniem/dustpress-debugger 适用场景与选型建议
devgeniem/dustpress-debugger 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 68.38k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2016 年 04 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「javascript」 「plugin」 「theme」 「wordpress」 「debugger」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 devgeniem/dustpress-debugger 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 devgeniem/dustpress-debugger 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 devgeniem/dustpress-debugger 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
CakePHP 4.x AdminLTE Theme.
Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.
Caching and compression for Twig assets (JavaScript and CSS).
A pretty nice way to expose your translation messages to your JavaScript.
PHP client for the Google Closure Compiler API in one file.
统计信息
- 总下载量: 68.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2016-04-22
