定制 jdsdev/craft-manifest 二次开发

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

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

jdsdev/craft-manifest

Composer 安装命令:

composer require jdsdev/craft-manifest

包简介

Helper plugin for Webpack's manifest.json in Craft templates.

README 文档

README

Adapted from mister-bk/craft-plugin-mix for generic Webpack support.

Adds a set of twig filters to find files in manifest.json (output by webpack-manifest-plugin) when provided with the corresponding source file.

Requirements

This plugin requires Craft CMS 3.0.0 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:
cd /path/to/project
  1. Then tell Composer to load the plugin:
composer require jdsdev/craft-manifest
  1. In the Craft Control Panel, go to Settings → Plugins and click the "Install" button for Manifest.

Configuration

To configure Manifest go to Settings → Plugins → Manifest in the Craft Control Panel.

The available settings are:

  • Public Path - The path of the public directory containing the index.php
  • Asset Path - The path of the asset directory where Webpack stores the compiled files

Usage

Find a versioned CSS file.

<link rel="stylesheet" href="{{ manifest('css/main.css') }}">

Find a versioned JavaScript file.

<script src="{{ manifest('js/main.js') }}"></script>

Lazily find a versioned file and build the tag based on the file extension.

{{ manifest('js/main.js', true) | raw }}

Alternatively include the content of a versioned file inline.

{{ manifest('css/main.css', true, true) | raw }}

License

Craft Manifest is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固