霜之哀伤/silex-assetic-serviceprovider

v1.1.0 2017-02-14 10:19 UTC

This package is auto-updated.

Last update: 2024-09-16 19:18:45 UTC


README

Code Climate

Silex的ServiceProvider,使Assetic功能可用。如果启用了Twig,它将启用Twig语法来包含资源。如果在调试模式下,资源将在每个请求上自动导出。

在使用生产模式时,您可以使用assetic:dump命令导出所有资源。

安装

$ composer require frostiede/silex-assetic-serviceprovider

之后,注册ServiceProvider

$app->register(new AsseticServiceProvider(), [
    'assetic.options' => [
        'assets_path' => '', // Path to your assets directory (e.g. /app/assets/)
        'web_path' => '' // Path to your web-directory (e.g. /web/)
    ]
]);

贡献

欢迎任何帮助。请随意创建问题和合并请求 :-)

许可证

MIT许可证

相关

本项目受mheap/Silex-Assetic的启发。