定制 catchamonkey/assetic-filter-bundle 二次开发

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

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

catchamonkey/assetic-filter-bundle

最新稳定版本:v0.4.0

Composer 安装命令:

composer require catchamonkey/assetic-filter-bundle

包简介

Catchamonkey AsseticFilterBundle

README 文档

README

##CatchamonkeyAsseticFilterBundle

Build Status
Scrutinizer
SensioLabsInsight

Symfony2 bundles that provides a basic CSS minifier in the form of an assetic filter

##Installation via composer

Step 1)

composer require "catchamonkey/assetic-filter-bundle"

Step 2) Register the Bundle in your kernel

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Catchamonkey\Bundle\AsseticFilterBundle\CatchamonkeyAsseticFilterBundle(),
    );
}

##Usage

Using the filter is as simple as adding it to a stylesheets tag

#app/Resources/views/base.html.twig

{% stylesheets filter='catchamonkey_cssmin'
    '@AcmeDemoBundle/Resources/public/css/*.css'
%}
<link rel="stylesheet" type="text/css" href="{{ asset_url }}" />
{% endstylesheets %}

Or use it in your assetic config using apply_to (added in v0.2.0)

#app/config/config.yml
# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    bundles:        []
    filters:
        catchamonkey_cssmin:
            resource:
"%kernel.root_dir%/../vendor/catchamonkey/assetic-filter-bundle/Catchamonkey/Bundle/AsseticFilterBundle/Resources/config/services.xml"
            apply_to: "\.css$"

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-11-25