shineunited/silex-assets
Composer 安装命令:
composer require shineunited/silex-assets
包简介
README 文档
README
A Silex package for managing local and remote static assets.
Installation
The recommended way to install silex-assets is through composer:
$ composer require shineunited/silex-assets
Configuration
require_once(__DIR__ . '/../vendor.autoload.php'); use Silex\Application; use ShineUnited\Silex\Assets\AssetManagerServiceProvider; $app->register(new AssetManagerServiceProvider(), [ 'assets.path' => '/path/to/assets/' ]);
Usage
Accessing prefixed assets
echo $app['assets']->lookup('my/asset.txt'); // returns: /path/to/assets/my/asset.txt
Mapping additional assets
$app['assets']->map('jquery.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'); echo $app['assets']->lookup('jquery.js'); // returns: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-17