elabx/processwire-alpinejs
Composer 安装命令:
composer require elabx/processwire-alpinejs
包简介
Add AlpineJS to ProcessWire admin
关键字:
README 文档
README
Adds alpinejs as a module in the ProcessWire admin.
Integrates Alpine.js locally into the ProcessWire Admin interface.
Features
- Local Hosting: Downloads Alpine.js core and plugins from unpkg.com to your server for local serving.
- Admin Integration: Automatically loads Alpine.js in the ProcessWire Admin backend.
- Plugin Support: Easily enable official Alpine.js plugins (Mask, Intersect, Persist, Focus, Collapse, Morph, History).
- 1-Click Updates: Check for updates and download the latest version directly from the module configuration.
Requirements
- ProcessWire
3.0or newer - PHP
7.3or newer
Installation
Install the module from the modules directory or with Composer:
composer require elabx/processwire-alpinejs
Setup
After installing, you need to configure where Alpine.js is loaded from. There are two options:
Option 1: Download via module settings
Go to Modules > Configure > AlpineJS and click the download button. This fetches the latest Alpine.js core and plugins from unpkg.com and stores them locally in the module's js/ directory.
Option 2: Custom file path
If you prefer to manage the Alpine.js file yourself (e.g. to version-control it), set the Custom Alpine.js file path in the module settings. This should be a path relative to the site root, such as site/templates/scripts/alpine.js. When set, this file is used instead of the downloaded version.
You can also override the core script URL programmatically via hook:
$wire->addHookAfter('AlpineJS::getCoreScriptUrl', function($event) { $event->return = '/site/templates/scripts/alpine.js'; });
Usage
Admin Backend
Alpine.js is automatically loaded in the ProcessWire admin. You can use it in your custom admin pages, hooks, or Inputfields.
Frontend
To use Alpine.js in your frontend templates, output the scripts manually:
// Load only Alpine Core echo $modules->get('AlpineJS')->renderScripts(); // Load Alpine Core + Plugins echo $modules->get('AlpineJS')->renderScripts(['intersect', 'persist']);
elabx/processwire-alpinejs 适用场景与选型建议
elabx/processwire-alpinejs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.67k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 03 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「processwire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 elabx/processwire-alpinejs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 elabx/processwire-alpinejs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 elabx/processwire-alpinejs 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Installs processwire 3rd party modules to PW system "site/modules" directory.
Provides ProcessWire integration for various template engines such as Twig.
ProcessWire module adding Smarty to the TemplateEngineFactory
Module for ProcessWire which automatically generates Blurhashs.
Send ProcessWire Logs to Logstash/Kibana
ProcessWire CMS/CMF module for converting Google Maps links to embedded maps.
统计信息
- 总下载量: 1.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-06