承接 nathancox/minify 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nathancox/minify

Composer 安装命令:

composer require nathancox/minify

包简介

Minifies CSS requirements using Minify (http://code.google.com/p/minify/)

README 文档

README

This module replaces part of the Requirements system to compress CSS files using http://code.google.com/p/minify/. The idea and implementation are basically stolen from Tonyair (http://www.silverstripe.org/general-questions/show/14206)

Maintainer

Nathan Cox (nathan@flyingmonkey.co.nz)

Requirements

SilverStripe 3.1+ Check out the SS-3.0 branch for a version compatible with SS 3.0

Installation Instructions

  1. Place the files in a directory called "minify" in the root of your SilverStripe installation
  2. Visit yoursite.com/dev/build

Usage

The module will automatically replace the Requirements backend with a custom subclass, so you don't need to do anything differently.

Just use combine_files to include your CSS as normal:

<?php

$themeFolder = $this->ThemeDir();
     
$files = array(
	$themeFolder . '/css/layout.css',
	$themeFolder . '/css/typography.css',
	$themeFolder . '/css/form.css'
);

Requirements::combine_files("common.min.css", $files);

Your CSS files will automatically be minified when combining (like JavaScript is).

By default relative urls in the CSS files (eg background-image:url('../images/background.png');) will be rewritten so the combined CSS file can be kept in assets (eg to background-image:url('/themes/mytheme/images/background.png');) but you can turn this behaviour off by putting the following line in your _config.php:

<?php

Config::inst()->update('Minify_Requirements_Backend', 'rewrite_uris', false);

Known Issues

Issue Tracker

Credits

JSMin Minify

统计信息

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

GitHub 信息

  • Stars: 26
  • Watchers: 3
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-01-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固