定制 lokhman/silex-assetic 二次开发

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

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

lokhman/silex-assetic

Composer 安装命令:

composer require lokhman/silex-assetic

包简介

Silex 2.0+ service provider for Assetic library

README 文档

README

StyleCI

Service provider to support Assetic library for Silex 2.0+ micro-framework.

This project is a part of silex-tools library.

Installation

You can install silex-assetic with Composer:

composer require lokhman/silex-assetic

Documentation

Register AsseticServiceProvider in your application with the following code:

use Lokhman\Silex\Provider\AsseticServiceProvider;

$app->register(new AsseticServiceProvider());

N.B.: Assetic will always be in debug mode if $app['debug'] is TRUE.

Configuration

Configuration is mostly the same as you have for AsseticBundle in Symfony framework.

"assetic.options": {
    "prefix": "/",
    "input_dir": "src",
    "output_dir": "web",
    "cache_dir": "cache/assetic",
    "twig_functions": [],
    "java": "/usr/bin/java",
    "ruby": "/usr/bin/ruby",
    "node": "/usr/bin/node",
    "node_paths": [],
    "filters": {
        "some_filter": {}
    },
    "assets": {
        "some_asset": {
            "inputs": [],
            "filters": [],
            "options": {}
        }
    }
}

Filters

Filters are defined in FilterFactory class and mirror names and options of AsseticBundle.

Twig

Twig extension is enabled automatically if you have TwigServiceProvider registered for the application.

Console

You can use console command with silex-console service provider simply adding DumpCommand to the console application.

use Lokhman\Silex\Console\Console;
use Lokhman\Silex\Console\Command\Assetic\DumpCommand;

$console = new Console($app);
$console->add(new DumpCommand());
$console->run();

Further reading

For more details please refer to the asset management documentation of Symfony framework.

License

Library is available under the MIT license. The included LICENSE file describes this in detail.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固