sekonda/craft3-mix
Composer 安装命令:
composer require sekonda/craft3-mix
包简介
Helper plugin for rev-manifest in Craft templates
关键字:
README 文档
README
You can already use Laravel Mix (Formerly Elixir) with Craft. It's rather straight forward. In fact, Matt Stauffer has an excellent write up on using Elixir on his company blog.
However, when using a CDN such as CloudFlare or Fastly. You might want to take advantage of file versioning to bust the cache. This plugin lets you use Elixir's built in versioning in your Craft templates!
Don't use Mix?
That's okay! The rev-manifest format is standard and this plugin is build-process agnostic. Just make sure your paths are configured properly.
Requirements
- Craft 3 (Tested on Beta 10)
- Composer
Looking for a Craft 2 solution? Check out our Laravel Elixir package for Craft 2
Installation and Setup
Please follow the installation guide for Craft 3 plugins here
Usage
Twig Function
{{ mix('css/all.css') }}
Note: you can optionally output the entire HTML tag by passing a second argument
trueto the function (e.g{{ elixir('css/all.css', true) }}.
Twig Filter
{{ 'css/all.css' | mix }}
<link rel="stylesheet" href="{{ craft.mix.version('css/all.css') }}">
and
<script src="{{ craft.mix.version('js/app.js') }}"></script>
If you are especially lazy, you can have the plugin automatically create the entire tag, based on the file extension.
{{ craft.mix.withTag('js/app.js') | raw }}
This will output the <script> or <link> tags appropriately.
Credits
About Venveo
Venveo is a Digital Marketing Agency for Building Materials Companies in Blacksburg, VA. Learn more about us on our website.
License
The MIT License (MIT). Please see License File for more information.
sekonda/craft3-mix 适用场景与选型建议
sekonda/craft3-mix 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 45 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 04 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cms」 「Craft」 「mix」 「craftcms」 「craft-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sekonda/craft3-mix 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sekonda/craft3-mix 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sekonda/craft3-mix 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Helper plugin for Laravel Mix in Craft CMS templates
Expand, collapse, change the status of, or delete multiple blocks in a Matrix field simultaneously.
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
DI, IoC container, reference spring bean
统计信息
- 总下载量: 45
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-28