定制 ersindemirtas-pp/craft3-mix 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ersindemirtas-pp/craft3-mix

Composer 安装命令:

composer require ersindemirtas-pp/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 true to 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.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固