mvccore/ext-view-helper-assets 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mvccore/ext-view-helper-assets

Composer 安装命令:

composer require mvccore/ext-view-helper-assets

包简介

MvcCore - Extension - View - Helper - Assets - to group, render, minify and cache javascript and css files, to prepare all application assets for final application packing.

README 文档

README

Latest Stable Version License PHP Version

MvcCore View Helper extensin to group, render, minify and cache javascript and css files, to prepare all application assets for final application packing.

Installation

composer require mvccore/ext-view-helper-assets

Features

  • grouping files together to deliver them in one response
  • optional rendering PHP code inside group files
  • optional completing assets url adresses targeting into index.php packed result, where small data sources (icons, image maps...), shoud be packed into, if you want to develop and build single file application.
    • Example: <?php echo $this->AssetUrl('favicon.ico'); ?>
  • saving grouped files in application temp directory '/Var/Tmp'
  • checking changed sources by file modification time or by file md5 imprint
  • no source files checking in application compiled mode (packed into PHP package)
  • optional CSS or JS minification by external library mrclay/minify ^2.2.0
  • optional downloading external js files into result group

Example

Base controller code:

namespace App\Controllers;

class Base {
	public function PreDispatch () {
		parent::PreDispatch();
		\MvcCore\Ext\Views\Helpers\Assets::SetGlobalOptions([
			cssMinify	=> TRUE,
			cssJoin		=> TRUE,
		]);
		$this->Css('head')
			->AppendRendered('/app/root/rel/path/to/first.css')
			->Append('/app/root/rel/path/to/second.css');
	}
}

Layout template code:

<html>
	<head>
		<!--
		   only one file will be generated and delivered:
		   <link rel="stylesheet" href="/Var/Tmp/temp-file-name.css" />
		-->
		<?php echo $this->Css('head')->Render(); ?>
	</head>
	<body>...</body>
</html>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固