定制 barryvdh/laravel-assetic 二次开发

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

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

barryvdh/laravel-assetic

最新稳定版本:v0.1.0

Composer 安装命令:

composer require barryvdh/laravel-assetic

包简介

README 文档

README

A ServiceProvider based on https://github.com/mheap/Silex-Assetic

Install via composer, add the ServiceProvider and configure assets/filters in the config.

Add this package to composer.json

"require": {
    ..
    "barryvdh/laravel-assetic": "0.1.x"
}

And run composer update. If you get the error, barryvdh/laravel-assetic dev-master requires kriswallsmith/assetic ~1.2 -> no matching package found, you might need to add or change your composer.json settings to the following:

{

    ...
    "minimum-stability": "dev",
    "prefer-stable": true

}

Then add the ServiceProvider to the providers array in app/config/app.php

'providers' => array(
    ..
    'Barryvdh\Assetic\AsseticServiceProvider',
)

Finally publish the config file (php artisan config:publish barryvdh/laravel-assetic) and add your filters to the config.

// app/config/packages/barryvdh/laravel-assetic/config.php
'filter_manager' => function(FilterManager $fm){
     $fm->set('less', new \Assetic\Filter\LessphpFilter());
     $fm->set('cssmin', new Assetic\Filter\CssMinFilter);
     $fm->set('jsmin', new Assetic\Filter\JSMinFilter);
     $fm->set('cssrewrite', new Assetic\Filter\CssRewriteFilter());
},

When Twig is installed, the Assetic Extension can be used. Be sure to include the AsseticServiceProvider AFTER the TwigServiceProvider

统计信息

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

GitHub 信息

  • Stars: 36
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-11-06