定制 cloudstek/grav-plugin-webpack-manifest 二次开发

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

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

cloudstek/grav-plugin-webpack-manifest

Composer 安装命令:

composer require cloudstek/grav-plugin-webpack-manifest

包简介

Grav plugin to use assets from a webpack manifest file.

关键字:

README 文档

README

The Webpack Manifest Plugin is an extension for Grav CMS. It allows you to develop themes that use for example Webpack that generate versioned assets (css/js).

As these generated files have a unique name every time they are generated, you can't reference them in your template directly. Webpack outputs a manifest file which contains a mapping between the unversioned filename and versioned filename, which is used by this plugin to replace assets with the correct file.

Installation

Installing the Webpack Manifest plugin can be done in one of three ways: The GPM (Grav Package Manager) installation method lets you quickly install the plugin with a simple terminal command, the manual method lets you do so via a zip file, and the admin method lets you do so via the Admin Plugin.

GPM Installation (Preferred)

To install the plugin via the GPM, through your system's terminal (also called the command line), navigate to the root of your Grav-installation, and enter:

bin/gpm install webpack-manifest

This will install the Webpack Manifest plugin into your /user/plugins-directory within Grav. Its files can be found under /your/site/grav/user/plugins/webpack-manifest.

Manual Installation

To install the plugin manually, download the zip-version of this repository and unzip it under /your/site/grav/user/plugins. Then rename the folder to webpack-manifest. You can find these files on GitHub or via GetGrav.org.

You should now have all the plugin files under

/your/site/grav/user/plugins/webpack-manifest

NOTE: This plugin is a modular component for Grav which may require other plugins to operate, please see its blueprints.yaml-file on GitHub.

Admin Plugin

If you use the Admin Plugin, you can install the plugin directly by browsing the Plugins-menu and clicking on the Add button.

Configuration

Before configuring this plugin, you should copy the user/plugins/webpack-manifest/webpack-manifest.yaml to user/config/plugins/webpack-manifest.yaml and only edit that copy.

Here is the default configuration and an explanation of available options:

# Enable/disable the plugin
enabled: true
# Path to manifest.json relative to your active theme
# For webpack use manifest.json. For Laravel Mix use mix-manifest.json.
filepath: manifest.json

Note that if you use the Admin Plugin, a file with your configuration named webpack-manifest.yaml will be saved in the user/config/plugins/-folder once the configuration is saved in the Admin.

Usage

Usage is simple as in most cases you can directly replace {% do asset.css( ... with {% do manifest.css( ..., the API is mostly the same and serves as a wrapper around some of the asset manager functionality, see https://learn.getgrav.org/16/themes/asset-manager.

Supported: add(), addCss(), addJs()

cloudstek/grav-plugin-webpack-manifest 适用场景与选型建议

cloudstek/grav-plugin-webpack-manifest 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 04 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 cloudstek/grav-plugin-webpack-manifest 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 cloudstek/grav-plugin-webpack-manifest 我们能提供哪些服务?
定制开发 / 二次开发

基于 cloudstek/grav-plugin-webpack-manifest 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-27